Skip to content

Commit 96f8471

Browse files
committed
Auto merge of #10649 - jsoref:spelling, r=Jarcho
Spelling This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling). The misspellings have been reported at https://github.com/jsoref/rust-clippy/actions/runs/4710771873#summary-12776860721 The action reports that the changes in this PR would make it happy: https://github.com/jsoref/rust-clippy/actions/runs/4710771874#summary-12776860722 changelog: none
2 parents 7a870ae + 6f7801f commit 96f8471

37 files changed

+52
-48
lines changed

book/src/development/proposals/syntax-tree-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ whether the pattern matched.
139139
140140
## Pattern syntax
141141

142-
The following examples demonstate the pattern syntax:
142+
The following examples demonstrate the pattern syntax:
143143

144144

145145
#### Any (`_`)

clippy_lints/src/casts/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ declare_clippy_lint! {
638638
#[clippy::version = "1.66.0"]
639639
pub AS_PTR_CAST_MUT,
640640
nursery,
641-
"casting the result of the `&self`-taking `as_ptr` to a mutabe pointer"
641+
"casting the result of the `&self`-taking `as_ptr` to a mutable pointer"
642642
}
643643

644644
declare_clippy_lint! {

clippy_lints/src/copies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ fn lint_same_cond(cx: &LateContext<'_>, conds: &[&Expr<'_>], ignored_ty_ids: &De
591591
conds,
592592
|e| hash_expr(cx, e),
593593
|lhs, rhs| {
594-
// Ignore eq_expr side effects iff one of the expressin kind is a method call
594+
// Ignore eq_expr side effects iff one of the expression kind is a method call
595595
// and the caller is not a mutable, including inner mutable type.
596596
if let ExprKind::MethodCall(_, caller, _, _) = lhs.kind {
597597
if method_caller_is_mutable(cx, caller, ignored_ty_ids) {

clippy_lints/src/formatting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_span::source_map::Span;
1010

1111
declare_clippy_lint! {
1212
/// ### What it does
13-
/// Checks for usage of the non-existent `=*`, `=!` and `=-`
13+
/// Checks for usage of the nonexistent `=*`, `=!` and `=-`
1414
/// operators.
1515
///
1616
/// ### Why is this bad?

clippy_lints/src/from_over_into.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl<'tcx> LateLintPass<'tcx> for FromOverInto {
9494
);
9595
}
9696

97-
let message = format!("replace the `Into` implentation with `From<{}>`", middle_trait_ref.self_ty());
97+
let message = format!("replace the `Into` implementation with `From<{}>`", middle_trait_ref.self_ty());
9898
if let Some(suggestions) = convert_to_from(cx, into_trait_seg, target_ty, self_ty, impl_item_ref) {
9999
diag.multipart_suggestion(message, suggestions, Applicability::MachineApplicable);
100100
} else {

clippy_lints/src/functions/misnamed_getters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn check_fn(cx: &LateContext<'_>, kind: FnKind<'_>, decl: &FnDecl<'_>, body:
4040
};
4141

4242
// Body must be &(mut) <self_data>.name
43-
// self_data is not neccessarilly self, to also lint sub-getters, etc…
43+
// self_data is not necessarily self, to also lint sub-getters, etc…
4444

4545
let block_expr = if_chain! {
4646
if let ExprKind::Block(block,_) = body.value.kind;

clippy_lints/src/functions/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ declare_clippy_lint! {
330330

331331
declare_clippy_lint! {
332332
/// ### What it does
333-
/// Lints when `impl Trait` is being used in a function's paremeters.
333+
/// Lints when `impl Trait` is being used in a function's parameters.
334334
/// ### Why is this bad?
335335
/// Turbofish syntax (`::<>`) cannot be used when `impl Trait` is being used, making `impl Trait` less powerful. Readability may also be a factor.
336336
///

clippy_lints/src/large_futures.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ declare_clippy_lint! {
1111
/// It checks for the size of a `Future` created by `async fn` or `async {}`.
1212
///
1313
/// ### Why is this bad?
14-
/// Due to the current [unideal implemention](https://github.com/rust-lang/rust/issues/69826) of `Generator`,
14+
/// Due to the current [unideal implementation](https://github.com/rust-lang/rust/issues/69826) of `Generator`,
1515
/// large size of a `Future` may cause stack overflows.
1616
///
1717
/// ### Example

clippy_lints/src/loops/manual_memcpy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustc_span::symbol::sym;
1515
use std::fmt::Display;
1616
use std::iter::Iterator;
1717

18-
/// Checks for for loops that sequentially copy items from one slice-like
18+
/// Checks for `for` loops that sequentially copy items from one slice-like
1919
/// object to another.
2020
pub(super) fn check<'tcx>(
2121
cx: &LateContext<'tcx>,

clippy_lints/src/manual_assert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualAssert {
6464
};
6565
let cond_sugg = sugg::Sugg::hir_with_applicability(cx, cond, "..", &mut applicability).maybe_par();
6666
let sugg = format!("assert!({not}{cond_sugg}, {format_args_snip});");
67-
// we show to the user the suggestion without the comments, but when applicating the fix, include the comments in the block
67+
// we show to the user the suggestion without the comments, but when applying the fix, include the comments in the block
6868
span_lint_and_then(
6969
cx,
7070
MANUAL_ASSERT,

clippy_lints/src/manual_let_else.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'tcx> LateLintPass<'tcx> for ManualLetElse {
101101
if source != MatchSource::Normal {
102102
return;
103103
}
104-
// Any other number than two arms doesn't (neccessarily)
104+
// Any other number than two arms doesn't (necessarily)
105105
// have a trivial mapping to let else.
106106
if arms.len() != 2 {
107107
return;

clippy_lints/src/manual_retain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ declare_clippy_lint! {
4646
#[clippy::version = "1.64.0"]
4747
pub MANUAL_RETAIN,
4848
perf,
49-
"`retain()` is simpler and the same functionalitys"
49+
"`retain()` is simpler and the same functionalities"
5050
}
5151

5252
pub struct ManualRetain {

clippy_lints/src/missing_trait_methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ declare_clippy_lint! {
1212
/// Checks if a provided method is used implicitly by a trait
1313
/// implementation. A usage example would be a wrapper where every method
1414
/// should perform some operation before delegating to the inner type's
15-
/// implemenation.
15+
/// implementation.
1616
///
1717
/// This lint should typically be enabled on a specific trait `impl` item
1818
/// rather than globally.

clippy_lints/src/slow_vector_initialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ enum InitializationType<'tcx> {
7474

7575
impl<'tcx> LateLintPass<'tcx> for SlowVectorInit {
7676
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
77-
// Matches initialization on reassignements. For example: `vec = Vec::with_capacity(100)`
77+
// Matches initialization on reassignments. For example: `vec = Vec::with_capacity(100)`
7878
if_chain! {
7979
if let ExprKind::Assign(left, right, _) = expr.kind;
8080

clippy_lints/src/trailing_empty_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn is_struct_with_trailing_zero_sized_array(cx: &LateContext<'_>, item: &Item<'_
6060
if let Some(last_field) = data.fields().last();
6161
if let rustc_hir::TyKind::Array(_, rustc_hir::ArrayLen::Body(length)) = last_field.ty.kind;
6262

63-
// Then check if that that array zero-sized
63+
// Then check if that array is zero-sized
6464
let length = Const::from_anon_const(cx.tcx, length.def_id);
6565
let length = length.try_eval_target_usize(cx.tcx, cx.param_env);
6666
if let Some(length) = length;

clippy_lints/src/types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ declare_clippy_lint! {
9090
///
9191
/// ### Why is this bad?
9292
/// `Option<_>` represents an optional value. `Option<Option<_>>`
93-
/// represents an optional optional value which is logically the same thing as an optional
94-
/// value but has an unneeded extra level of wrapping.
93+
/// represents an optional value which itself wraps an optional. This is logically the
94+
/// same thing as an optional value but has an unneeded extra level of wrapping.
9595
///
9696
/// If you have a case where `Some(Some(_))`, `Some(None)` and `None` are distinct cases,
9797
/// consider a custom `enum` instead, with clear names for each case.

clippy_lints/src/unnecessary_box_returns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl LateLintPass<'_> for UnnecessaryBoxReturns {
109109

110110
fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &rustc_hir::ImplItem<'_>) {
111111
// Ignore implementations of traits, because the lint should be on the
112-
// trait, not on the implmentation of it.
112+
// trait, not on the implementation of it.
113113
let Node::Item(parent) = cx.tcx.hir().get_parent(item.hir_id()) else { return };
114114
let ItemKind::Impl(parent) = parent.kind else { return };
115115
if parent.of_trait.is_some() {

clippy_utils/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,8 +2206,12 @@ pub fn is_slice_of_primitives(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<S
22062206
None
22072207
}
22082208

2209-
/// returns list of all pairs (a, b) from `exprs` such that `eq(a, b)`
2210-
/// `hash` must be comformed with `eq`
2209+
/// Returns list of all pairs `(a, b)` where `eq(a, b) == true`
2210+
/// and `a` is before `b` in `exprs` for all `a` and `b` in
2211+
/// `exprs`
2212+
///
2213+
/// Given functions `eq` and `hash` such that `eq(a, b) == true`
2214+
/// implies `hash(a) == hash(b)`
22112215
pub fn search_same<T, Hash, Eq>(exprs: &[T], hash: Hash, eq: Eq) -> Vec<(&T, &T)>
22122216
where
22132217
Hash: Fn(&T) -> u64,

clippy_utils/src/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'
9393
for &(predicate, _span) in cx.tcx.explicit_item_bounds(def_id) {
9494
match predicate.kind().skip_binder() {
9595
// For `impl Trait<U>`, it will register a predicate of `T: Trait<U>`, so we go through
96-
// and check substituions to find `U`.
96+
// and check substitutions to find `U`.
9797
ty::PredicateKind::Clause(ty::Clause::Trait(trait_predicate)) => {
9898
if trait_predicate
9999
.trait_ref
@@ -1101,7 +1101,7 @@ pub fn make_projection<'tcx>(
11011101
///
11021102
/// This function is for associated types which are "known" to be valid with the given
11031103
/// substitutions, and as such, will only return `None` when debug assertions are disabled in order
1104-
/// to prevent ICE's. With debug assertions enabled this will check that that type normalization
1104+
/// to prevent ICE's. With debug assertions enabled this will check that type normalization
11051105
/// succeeds as well as everything checked by `make_projection`.
11061106
pub fn make_normalized_projection<'tcx>(
11071107
tcx: TyCtxt<'tcx>,

lintcheck/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ impl Crate {
421421
{
422422
let subcrate = &stderr[63..];
423423
println!(
424-
"ERROR: failed to apply some suggetion to {} / to (sub)crate {subcrate}",
424+
"ERROR: failed to apply some suggestion to {} / to (sub)crate {subcrate}",
425425
self.name
426426
);
427427
}

tests/ui/auxiliary/proc_macro_attr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub fn rename_my_lifetimes(_args: TokenStream, input: TokenStream) -> TokenStrea
8282
elided += 1;
8383

8484
// HACK: Syn uses `Span` from the proc_macro2 crate, and does not seem to reexport it.
85-
// In order to avoid adding the dependency, get a default span from a non-existent token.
85+
// In order to avoid adding the dependency, get a default span from a nonexistent token.
8686
// A default span is needed to mark the code as coming from expansion.
8787
let span = Star::default().span();
8888

tests/ui/cast_slice_different_sizes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323
r_x as *const [i32]
2424
} as *const [u8];
2525

26-
// Check that resores of the same size are detected through blocks
26+
// Check that resources of the same size are detected through blocks
2727
let restore_block_1 = { r_x as *const [i32] } as *const [u8] as *const [u32];
2828
let restore_block_2 = { ({ r_x as *const [i32] }) as *const [u8] } as *const [u32];
2929
let restore_block_3 = {

tests/ui/from_over_into.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | impl Into<StringWrapper> for String {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::from-over-into` implied by `-D warnings`
8-
help: replace the `Into` implentation with `From<std::string::String>`
8+
help: replace the `Into` implementation with `From<std::string::String>`
99
|
1010
LL ~ impl From<String> for StringWrapper {
1111
LL ~ fn from(val: String) -> Self {
@@ -18,7 +18,7 @@ error: an implementation of `From` is preferred since it gives you `Into<_>` for
1818
LL | impl Into<SelfType> for String {
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020
|
21-
help: replace the `Into` implentation with `From<std::string::String>`
21+
help: replace the `Into` implementation with `From<std::string::String>`
2222
|
2323
LL ~ impl From<String> for SelfType {
2424
LL ~ fn from(val: String) -> Self {
@@ -31,7 +31,7 @@ error: an implementation of `From` is preferred since it gives you `Into<_>` for
3131
LL | impl Into<SelfKeywords> for X {
3232
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333
|
34-
help: replace the `Into` implentation with `From<X>`
34+
help: replace the `Into` implementation with `From<X>`
3535
|
3636
LL ~ impl From<X> for SelfKeywords {
3737
LL ~ fn from(val: X) -> Self {
@@ -48,7 +48,7 @@ LL | impl core::convert::Into<bool> for crate::ExplicitPaths {
4848
|
4949
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
5050
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
51-
help: replace the `Into` implentation with `From<ExplicitPaths>`
51+
help: replace the `Into` implementation with `From<ExplicitPaths>`
5252
|
5353
LL ~ impl core::convert::From<crate::ExplicitPaths> for bool {
5454
LL ~ fn from(mut val: crate::ExplicitPaths) -> Self {
@@ -64,7 +64,7 @@ error: an implementation of `From` is preferred since it gives you `Into<_>` for
6464
LL | impl<T> Into<FromOverInto<T>> for Vec<T> {
6565
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6666
|
67-
help: replace the `Into` implentation with `From<std::vec::Vec<T>>`
67+
help: replace the `Into` implementation with `From<std::vec::Vec<T>>`
6868
|
6969
LL ~ impl<T> From<Vec<T>> for FromOverInto<T> {
7070
LL ~ fn from(val: Vec<T>) -> Self {

tests/ui/from_over_into_unfixable.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: an implementation of `From` is preferred since it gives you `Into<_>` for
44
LL | impl Into<InMacro> for String {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
= help: replace the `Into` implentation with `From<std::string::String>`
7+
= help: replace the `Into` implementation with `From<std::string::String>`
88
= note: `-D clippy::from-over-into` implied by `-D warnings`
99

1010
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
@@ -13,7 +13,7 @@ error: an implementation of `From` is preferred since it gives you `Into<_>` for
1313
LL | impl Into<WeirdUpperSelf> for &'static [u8] {
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515
|
16-
= help: replace the `Into` implentation with `From<&'static [u8]>`
16+
= help: replace the `Into` implementation with `From<&'static [u8]>`
1717

1818
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
1919
--> $DIR/from_over_into_unfixable.rs:28:1
@@ -23,7 +23,7 @@ LL | impl Into<u8> for ContainsVal {
2323
|
2424
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
2525
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
26-
= help: replace the `Into` implentation with `From<ContainsVal>`
26+
= help: replace the `Into` implementation with `From<ContainsVal>`
2727

2828
error: aborting due to 3 previous errors
2929

tests/ui/let_with_type_underscore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn main() {
1212
let _: _ = 2;
1313
let x: _ = func();
1414

15-
let x = 1; // Will not lint, Rust inferres this to an integer before Clippy
15+
let x = 1; // Will not lint, Rust infers this to an integer before Clippy
1616
let x = func();
1717
let x: Vec<_> = Vec::<u32>::new();
1818
let x: [_; 1] = [1];

tests/ui/manual_retain.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ fn main() {
2323
}
2424

2525
fn binary_heap_retain() {
26-
// NOTE: Do not lint now, because binary_heap_retain is nighyly API.
27-
// And we need to add a test case for msrv if we update this implmention.
26+
// NOTE: Do not lint now, because binary_heap_retain is nightly API.
27+
// And we need to add a test case for msrv if we update this implementation.
2828
// https://github.com/rust-lang/rust/issues/71503
2929
let mut heap = BinaryHeap::from([1, 2, 3]);
3030
heap = heap.into_iter().filter(|x| x % 2 == 0).collect();

tests/ui/manual_retain.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ fn main() {
2323
}
2424

2525
fn binary_heap_retain() {
26-
// NOTE: Do not lint now, because binary_heap_retain is nighyly API.
27-
// And we need to add a test case for msrv if we update this implmention.
26+
// NOTE: Do not lint now, because binary_heap_retain is nightly API.
27+
// And we need to add a test case for msrv if we update this implementation.
2828
// https://github.com/rust-lang/rust/issues/71503
2929
let mut heap = BinaryHeap::from([1, 2, 3]);
3030
heap = heap.into_iter().filter(|x| x % 2 == 0).collect();

tests/ui/needless_for_each_fixable.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn should_not_lint() {
110110
}),
111111
}
112112

113-
// `for_each` is in a let bingind.
113+
// `for_each` is in a let binding.
114114
let _ = v.iter().for_each(|elem| {
115115
acc += elem;
116116
});

tests/ui/needless_for_each_fixable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn should_not_lint() {
110110
}),
111111
}
112112

113-
// `for_each` is in a let bingind.
113+
// `for_each` is in a let binding.
114114
let _ = v.iter().for_each(|elem| {
115115
acc += elem;
116116
});

tests/ui/no_mangle_with_rust_abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn rust_abi_multiline_function_really_long_name_to_overflow_args_to_multiple_lin
2525
0
2626
}
2727

28-
// Must not run on functions that explicitly opt in to Rust ABI with `extern "Rust"`
28+
// Must not run on functions that explicitly opt in to using the Rust ABI with `extern "Rust"`
2929
#[no_mangle]
3030
#[rustfmt::skip]
3131
extern "Rust" fn rust_abi_fn_explicit_opt_in(arg_one: u32, arg_two: usize) {}

tests/ui/option_if_let_else.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ enum DummyEnum {
9797
Two,
9898
}
9999

100-
// should not warn since there is a compled complex subpat
100+
// should not warn since there is a complex subpat
101101
// see #7991
102102
fn complex_subpat() -> DummyEnum {
103103
let x = Some(DummyEnum::One(1));

tests/ui/option_if_let_else.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ enum DummyEnum {
120120
Two,
121121
}
122122

123-
// should not warn since there is a compled complex subpat
123+
// should not warn since there is a complex subpat
124124
// see #7991
125125
fn complex_subpat() -> DummyEnum {
126126
let x = Some(DummyEnum::One(1));

tests/ui/same_name_method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ mod should_lint {
6262
impl T1 for S {}
6363
}
6464

65-
mod multiply_conflicit_trait {
65+
mod multiple_conflicting_traits {
6666
use crate::{T1, T2};
6767

6868
struct S;

tests/ui/trailing_empty_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct ReprCAlign {
144144

145145
// NOTE: because of https://doc.rust-lang.org/stable/reference/type-layout.html#primitive-representation-of-enums-with-fields and I'm not sure when in the compilation pipeline that would happen
146146
#[repr(C)]
147-
enum DontLintAnonymousStructsFromDesuraging {
147+
enum DontLintAnonymousStructsFromDesugaring {
148148
A(u32),
149149
B(f32, [u64; 0]),
150150
C { x: u32, y: [u64; 0] },

tests/ui/uninit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ fn main() {
1717
// This is OK, because `MaybeUninit` allows uninitialized data.
1818
let _: MaybeUninit<usize> = unsafe { MaybeUninit::uninit().assume_init() };
1919

20-
// This is OK, because all constitutent types are uninit-compatible.
20+
// This is OK, because all constituent types are uninit-compatible.
2121
let _: (MaybeUninit<usize>, MaybeUninit<bool>) = unsafe { MaybeUninit::uninit().assume_init() };
2222

23-
// This is OK, because all constitutent types are uninit-compatible.
23+
// This is OK, because all constituent types are uninit-compatible.
2424
let _: (MaybeUninit<usize>, [MaybeUninit<bool>; 2]) = unsafe { MaybeUninit::uninit().assume_init() };
2525

2626
// This is OK, because our own MaybeUninit is just as fine as the one from core.

0 commit comments

Comments
 (0)