Skip to content

Commit d0cf348

Browse files
committed
Auto merge of #8580 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` Nice small sync with only typo fixes changelog: none
2 parents e29b3b5 + c995a8b commit d0cf348

14 files changed

+27
-27
lines changed

.github/ISSUE_TEMPLATE/ice.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ body:
1010
attributes:
1111
label: Summary
1212
description: |
13-
If possible, try to provide a minimal verifiable example. You can read ["Rust Bug Minimization Patterns"][mve] for how to create smaller examples. Otherwise, provide the crate where the ICE occured.
13+
If possible, try to provide a minimal verifiable example. You can read ["Rust Bug Minimization Patterns"][mve] for how to create smaller examples. Otherwise, provide the crate where the ICE occurred.
1414
1515
[mve]: http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
1616
validations:

clippy_lints/src/copies.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ declare_clippy_lint! {
126126
/// Duplicate code is less maintainable.
127127
///
128128
/// ### Known problems
129-
/// * The lint doesn't check if the moved expressions modify values that are beeing used in
129+
/// * The lint doesn't check if the moved expressions modify values that are being used in
130130
/// the if condition. The suggestion can in that case modify the behavior of the program.
131131
/// See [rust-clippy#7452](https://github.com/rust-lang/rust-clippy/issues/7452)
132132
///

clippy_lints/src/fallible_impl_from.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ fn lint_impl_body<'tcx>(cx: &LateContext<'tcx>, impl_span: Span, impl_items: &[h
8686

8787
// check for `unwrap`
8888
if let Some(arglists) = method_chain_args(expr, &["unwrap"]) {
89-
let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
90-
if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option)
91-
|| is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result)
89+
let receiver_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
90+
if is_type_diagnostic_item(self.lcx, receiver_ty, sym::Option)
91+
|| is_type_diagnostic_item(self.lcx, receiver_ty, sym::Result)
9292
{
9393
self.result.push(expr.span);
9494
}

clippy_lints/src/float_equality_without_abs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare_clippy_lint! {
2020
///
2121
/// ### Known problems
2222
/// If the user can ensure that b is larger than a, the `.abs()` is
23-
/// technically unneccessary. However, it will make the code more robust and doesn't have any
23+
/// technically unnecessary. However, it will make the code more robust and doesn't have any
2424
/// large performance implications. If the abs call was deliberately left out for performance
2525
/// reasons, it is probably better to state this explicitly in the code, which then can be done
2626
/// with an allow.
@@ -69,7 +69,7 @@ impl<'tcx> LateLintPass<'tcx> for FloatEqualityWithoutAbs {
6969

7070
if_chain! {
7171

72-
// left hand side is a substraction
72+
// left hand side is a subtraction
7373
if let ExprKind::Binary(
7474
Spanned {
7575
node: BinOpKind::Sub,
@@ -84,7 +84,7 @@ impl<'tcx> LateLintPass<'tcx> for FloatEqualityWithoutAbs {
8484
if let Res::Def(DefKind::AssocConst, def_id) = cx.qpath_res(epsilon_path, rhs.hir_id);
8585
if match_def_path(cx, def_id, &paths::F32_EPSILON) || match_def_path(cx, def_id, &paths::F64_EPSILON);
8686

87-
// values of the substractions on the left hand side are of the type float
87+
// values of the subtractions on the left hand side are of the type float
8888
let t_val_l = cx.typeck_results().expr_ty(val_l);
8989
let t_val_r = cx.typeck_results().expr_ty(val_r);
9090
if let ty::Float(_) = t_val_l.kind();

clippy_lints/src/only_used_in_recursion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub fn is_array(ty: Ty<'_>) -> bool {
224224
/// This builds the graph of side effect.
225225
/// The edge `a -> b` means if `a` has side effect, `b` will have side effect.
226226
///
227-
/// There are some exmaple in following code:
227+
/// There are some example in following code:
228228
/// ```rust, ignore
229229
/// let b = 1;
230230
/// let a = b; // a -> b

clippy_lints/src/suspicious_operation_groupings.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn ident_swap_sugg(
290290
// used instead, in these cases.
291291
*applicability = Applicability::MaybeIncorrect;
292292

293-
// We arbitraily choose one side to suggest changing,
293+
// We arbitrarily choose one side to suggest changing,
294294
// since we don't have a better guess. If the user
295295
// ends up duplicating a clause, the `logic_bug` lint
296296
// should catch it.
@@ -374,19 +374,19 @@ fn strip_non_ident_wrappers(expr: &Expr) -> &Expr {
374374
}
375375

376376
fn extract_related_binops(kind: &ExprKind) -> Option<Vec<BinaryOp<'_>>> {
377-
append_opt_vecs(chained_binops(kind), if_statment_binops(kind))
377+
append_opt_vecs(chained_binops(kind), if_statement_binops(kind))
378378
}
379379

380-
fn if_statment_binops(kind: &ExprKind) -> Option<Vec<BinaryOp<'_>>> {
380+
fn if_statement_binops(kind: &ExprKind) -> Option<Vec<BinaryOp<'_>>> {
381381
match kind {
382382
ExprKind::If(ref condition, _, _) => chained_binops(&condition.kind),
383-
ExprKind::Paren(ref e) => if_statment_binops(&e.kind),
383+
ExprKind::Paren(ref e) => if_statement_binops(&e.kind),
384384
ExprKind::Block(ref block, _) => {
385385
let mut output = None;
386386
for stmt in &block.stmts {
387387
match stmt.kind {
388388
StmtKind::Expr(ref e) | StmtKind::Semi(ref e) => {
389-
output = append_opt_vecs(output, if_statment_binops(&e.kind));
389+
output = append_opt_vecs(output, if_statement_binops(&e.kind));
390390
},
391391
_ => {},
392392
}

clippy_lints/src/trailing_empty_array.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare_clippy_lint! {
1010
/// Displays a warning when a struct with a trailing zero-sized array is declared without a `repr` attribute.
1111
///
1212
/// ### Why is this bad?
13-
/// Zero-sized arrays aren't very useful in Rust itself, so such a struct is likely being created to pass to C code or in some other situation where control over memory layout matters (for example, in conjuction with manual allocation to make it easy to compute the offset of the array). Either way, `#[repr(C)]` (or another `repr` attribute) is needed.
13+
/// Zero-sized arrays aren't very useful in Rust itself, so such a struct is likely being created to pass to C code or in some other situation where control over memory layout matters (for example, in conjunction with manual allocation to make it easy to compute the offset of the array). Either way, `#[repr(C)]` (or another `repr` attribute) is needed.
1414
///
1515
/// ### Example
1616
/// ```rust

clippy_lints/src/trait_bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ declare_clippy_lint! {
4646
///
4747
/// ### Why is this bad?
4848
/// Duplicate bounds makes the code
49-
/// less readable than specifing them only once.
49+
/// less readable than specifying them only once.
5050
///
5151
/// ### Example
5252
/// ```rust

clippy_lints/src/unwrap_in_result.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ impl<'a, 'tcx> Visitor<'tcx> for FindExpectUnwrap<'a, 'tcx> {
8383
fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {
8484
// check for `expect`
8585
if let Some(arglists) = method_chain_args(expr, &["expect"]) {
86-
let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
87-
if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option)
88-
|| is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result)
86+
let receiver_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
87+
if is_type_diagnostic_item(self.lcx, receiver_ty, sym::Option)
88+
|| is_type_diagnostic_item(self.lcx, receiver_ty, sym::Result)
8989
{
9090
self.result.push(expr.span);
9191
}
9292
}
9393

9494
// check for `unwrap`
9595
if let Some(arglists) = method_chain_args(expr, &["unwrap"]) {
96-
let reciever_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
97-
if is_type_diagnostic_item(self.lcx, reciever_ty, sym::Option)
98-
|| is_type_diagnostic_item(self.lcx, reciever_ty, sym::Result)
96+
let receiver_ty = self.typeck_results.expr_ty(&arglists[0][0]).peel_refs();
97+
if is_type_diagnostic_item(self.lcx, receiver_ty, sym::Option)
98+
|| is_type_diagnostic_item(self.lcx, receiver_ty, sym::Result)
9999
{
100100
self.result.push(expr.span);
101101
}

clippy_lints/src/upper_case_acronyms.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl LateLintPass<'_> for UpperCaseAcronyms {
114114
check_ident(cx, &it.ident, self.upper_case_acronyms_aggressive);
115115
},
116116
ItemKind::Enum(ref enumdef, _) => {
117-
// check enum variants seperately because again we only want to lint on private enums and
117+
// check enum variants separately because again we only want to lint on private enums and
118118
// the fn check_variant does not know about the vis of the enum of its variants
119119
enumdef
120120
.variants

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-03-14"
2+
channel = "nightly-2022-03-24"
33
components = ["cargo", "llvm-tools-preview", "rust-src", "rust-std", "rustc", "rustc-dev", "rustfmt"]

tests/lint_message_convention.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl Message {
1616
fn new(path: PathBuf) -> Self {
1717
let content: String = std::fs::read_to_string(&path).unwrap();
1818
// we don't want the first letter after "error: ", "help: " ... to be capitalized
19-
// also no puncutation (except for "?" ?) at the end of a line
19+
// also no punctuation (except for "?" ?) at the end of a line
2020
let regex_set: RegexSet = RegexSet::new(&[
2121
r"error: [A-Z]",
2222
r"help: [A-Z]",

tests/ui/manual_memcpy/with_loop_counters.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub fn manual_copy_with_counters(src: &[i32], dst: &mut [i32], dst2: &mut [i32])
5959
}
6060

6161
// make sure parentheses are added properly to bitwise operators, which have lower precedence than
62-
// arithmetric ones
62+
// arithmetic ones
6363
let mut count = 0 << 1;
6464
for i in 0..1 << 1 {
6565
dst[count] = src[i + 2];

tests/workspace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn test_no_deps_ignores_path_deps_in_workspaces() {
9393
output
9494
};
9595

96-
// Trigger a sucessful build, so Cargo would like to cache the build result.
96+
// Trigger a successful build, so Cargo would like to cache the build result.
9797
successful_build();
9898

9999
// Make sure there's no spurious rebuild when nothing changes.

0 commit comments

Comments
 (0)