Skip to content

Commit 01d75b1

Browse files
committed
Auto merge of rust-lang#8825 - ydah:fix_spelling, r=giraffate
Tweak some words improved representation Hello! Thank you for this awesome project! This PR has implemented improved representation. - Use "lib" instead of "lifb" - Use "triggered" instead of "triggere" - Use "blacklisted_name" instead of "blackisted_name" - Use "stabilization" instead of "stabilisation" - Use "behavior" instead of "behaviour" - Use "target" instead of "tartet" - Use "checked_add" instead of "chcked_add" - Use "anti-pattern" instead of "antipattern" - Use "suggestion" instead of "suggesttion" - Use "example" instead of "exampel" - Use "Cheat Sheet" instead of "Cheatsheet" --- changelog: none
2 parents b54f446 + 4e5f69c commit 01d75b1

16 files changed

+23
-23
lines changed

clippy_dev/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
124124
* the lint count in README.md is correct\n \
125125
* the changelog contains markdown link references at the bottom\n \
126126
* all lint groups include the correct lints\n \
127-
* lint modules in `clippy_lints/*` are visible in `src/lifb.rs` via `pub mod`\n \
127+
* lint modules in `clippy_lints/*` are visible in `src/lib.rs` via `pub mod`\n \
128128
* all lints are registered in the lint store",
129129
)
130130
.arg(Arg::with_name("print-only").long("print-only").help(

clippy_dev/src/new_lint.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fn to_camel_case(name: &str) -> String {
133133
.collect()
134134
}
135135

136-
fn get_stabilisation_version() -> String {
136+
fn get_stabilization_version() -> String {
137137
fn parse_manifest(contents: &str) -> Option<String> {
138138
let version = contents
139139
.lines()
@@ -199,7 +199,7 @@ fn get_lint_file_contents(lint: &LintData<'_>, enable_msrv: bool) -> String {
199199
},
200200
};
201201

202-
let version = get_stabilisation_version();
202+
let version = get_stabilization_version();
203203
let lint_name = lint.name;
204204
let category = lint.category;
205205
let name_camel = to_camel_case(lint.name);

clippy_lints/src/assign_ops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ declare_clippy_lint! {
5050
/// ### Known problems
5151
/// Clippy cannot know for sure if `a op= a op b` should have
5252
/// been `a = a op a op b` or `a = a op b`/`a op= b`. Therefore, it suggests both.
53-
/// If `a op= a op b` is really the correct behaviour it should be
53+
/// If `a op= a op b` is really the correct behavior it should be
5454
/// written as `a = a op a op b` as it's less confusing.
5555
///
5656
/// ### Example

clippy_lints/src/casts/cast_slice_different_sizes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fn expr_cast_chain_tys<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Optio
121121
let to_slice_ty = get_raw_slice_ty_mut(cast_to)?;
122122

123123
// If the expression that makes up the source of this cast is itself a cast, recursively
124-
// call `expr_cast_chain_tys` and update the end type with the final tartet type.
124+
// call `expr_cast_chain_tys` and update the end type with the final target type.
125125
// Otherwise, this cast is not immediately nested, just construct the info for this cast
126126
if let Some(prev_info) = expr_cast_chain_tys(cx, cast_expr) {
127127
Some(CastChainInfo {

clippy_lints/src/casts/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ declare_clippy_lint! {
306306
/// Checks for casts of `&T` to `&mut T` anywhere in the code.
307307
///
308308
/// ### Why is this bad?
309-
/// It’s basically guaranteed to be undefined behaviour.
309+
/// It’s basically guaranteed to be undefined behavior.
310310
/// `UnsafeCell` is the only way to obtain aliasable data that is considered
311311
/// mutable.
312312
///

clippy_lints/src/default_union_representation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare_clippy_lint! {
2525
///
2626
/// fn main() {
2727
/// let _x: u32 = unsafe {
28-
/// Foo { a: 0_i32 }.b // Undefined behaviour: `b` is allowed to be padding
28+
/// Foo { a: 0_i32 }.b // Undefined behavior: `b` is allowed to be padding
2929
/// };
3030
/// }
3131
/// ```
@@ -39,7 +39,7 @@ declare_clippy_lint! {
3939
///
4040
/// fn main() {
4141
/// let _x: u32 = unsafe {
42-
/// Foo { a: 0_i32 }.b // Now defined behaviour, this is just an i32 -> u32 transmute
42+
/// Foo { a: 0_i32 }.b // Now defined behavior, this is just an i32 -> u32 transmute
4343
/// };
4444
/// }
4545
/// ```

clippy_lints/src/derive.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ declare_clippy_lint! {
102102
/// types.
103103
///
104104
/// ### Why is this bad?
105-
/// To avoid surprising behaviour, these traits should
106-
/// agree and the behaviour of `Copy` cannot be overridden. In almost all
105+
/// To avoid surprising behavior, these traits should
106+
/// agree and the behavior of `Copy` cannot be overridden. In almost all
107107
/// situations a `Copy` type should have a `Clone` implementation that does
108108
/// nothing more than copy the object, which is what `#[derive(Copy, Clone)]`
109109
/// gets you.

clippy_lints/src/main_recursion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare_clippy_lint! {
1212
///
1313
/// ### Why is this bad?
1414
/// Apart from special setups (which we could detect following attributes like #![no_std]),
15-
/// recursing into main() seems like an unintuitive antipattern we should be able to detect.
15+
/// recursing into main() seems like an unintuitive anti-pattern we should be able to detect.
1616
///
1717
/// ### Example
1818
/// ```no_run

clippy_lints/src/methods/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ declare_clippy_lint! {
15631563
#[clippy::version = "1.39.0"]
15641564
pub MANUAL_SATURATING_ARITHMETIC,
15651565
style,
1566-
"`.chcked_add/sub(x).unwrap_or(MAX/MIN)`"
1566+
"`.checked_add/sub(x).unwrap_or(MAX/MIN)`"
15671567
}
15681568

15691569
declare_clippy_lint! {

clippy_lints/src/mutable_debug_assertion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ declare_clippy_lint! {
1616
/// ### Why is this bad?
1717
/// In release builds `debug_assert!` macros are optimized out by the
1818
/// compiler.
19-
/// Therefore mutating something in a `debug_assert!` macro results in different behaviour
19+
/// Therefore mutating something in a `debug_assert!` macro results in different behavior
2020
/// between a release and debug build.
2121
///
2222
/// ### Example

clippy_lints/src/needless_bitwise_bool.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn is_bitwise_operation(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
5353
false
5454
}
5555

56-
fn suggesstion_snippet(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<String> {
56+
fn suggestion_snippet(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<String> {
5757
if let ExprKind::Binary(ref op, left, right) = expr.kind {
5858
if let (Some(l_snippet), Some(r_snippet)) = (snippet_opt(cx, left.span), snippet_opt(cx, right.span)) {
5959
let op_snippet = match op.node {
@@ -75,7 +75,7 @@ impl LateLintPass<'_> for NeedlessBitwiseBool {
7575
expr.span,
7676
"use of bitwise operator instead of lazy operator between booleans",
7777
|diag| {
78-
if let Some(sugg) = suggesstion_snippet(cx, expr) {
78+
if let Some(sugg) = suggestion_snippet(cx, expr) {
7979
diag.span_suggestion(expr.span, "try", sugg, Applicability::MachineApplicable);
8080
}
8181
},

clippy_lints/src/pass_by_ref_or_value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ declare_clippy_lint! {
5252
/// to a function that needs the memory address. For further details, refer to
5353
/// [this issue](https://github.com/rust-lang/rust-clippy/issues/5953)
5454
/// that explains a real case in which this false positive
55-
/// led to an **undefined behaviour** introduced with unsafe code.
55+
/// led to an **undefined behavior** introduced with unsafe code.
5656
///
5757
/// ### Example
5858
///

clippy_lints/src/redundant_clone.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ impl<'a, 'tcx> mir::visit::Visitor<'tcx> for PossibleBorrowerVisitor<'a, 'tcx> {
632632
}
633633

634634
/// Collect possible borrowed for every `&mut` local.
635-
/// For exampel, `_1 = &mut _2` generate _1: {_2,...}
635+
/// For example, `_1 = &mut _2` generate _1: {_2,...}
636636
/// Known Problems: not sure all borrowed are tracked
637637
struct PossibleOriginVisitor<'a, 'tcx> {
638638
possible_origin: TransitiveRelation,

clippy_lints/src/transmute/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare_clippy_lint! {
2727
/// architecture.
2828
///
2929
/// ### Why is this bad?
30-
/// It's basically guaranteed to be undefined behaviour.
30+
/// It's basically guaranteed to be undefined behavior.
3131
///
3232
/// ### Known problems
3333
/// When accessing C, users might want to store pointer
@@ -40,7 +40,7 @@ declare_clippy_lint! {
4040
#[clippy::version = "pre 1.29.0"]
4141
pub WRONG_TRANSMUTE,
4242
correctness,
43-
"transmutes that are confusing at best, undefined behaviour at worst and always useless"
43+
"transmutes that are confusing at best, undefined behavior at worst and always useless"
4444
}
4545

4646
// FIXME: Move this to `complexity` again, after #5343 is fixed

doc/adding_lints.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ because that's clearly a non-descriptive name.
2828
- [Debugging](#debugging)
2929
- [PR Checklist](#pr-checklist)
3030
- [Adding configuration to a lint](#adding-configuration-to-a-lint)
31-
- [Cheatsheet](#cheatsheet)
31+
- [Cheat Sheet](#cheat-sheet)
3232

3333
## Setup
3434

@@ -649,7 +649,7 @@ in the following steps:
649649
with the configuration value and a rust file that should be linted by Clippy. The test can
650650
otherwise be written as usual.
651651

652-
## Cheatsheet
652+
## Cheat Sheet
653653

654654
Here are some pointers to things you are likely going to need for every lint:
655655

tests/ui/blacklisted_name.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ fn issue_1647_ref_mut() {
4646

4747
mod tests {
4848
fn issue_7305() {
49-
// `blackisted_name` lint should not be triggered inside of the test code.
49+
// `blacklisted_name` lint should not be triggered inside of the test code.
5050
let foo = 0;
5151

52-
// Check that even in nested functions warning is still not triggere.
52+
// Check that even in nested functions warning is still not triggered.
5353
fn nested() {
5454
let foo = 0;
5555
}

0 commit comments

Comments
 (0)