Make typo in field and name suggestions verbose
This commit is contained in:
parent
5bc345055b
commit
6cd44a472c
74 changed files with 1165 additions and 241 deletions
|
|
@ -2296,7 +2296,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
let suggested_name =
|
||||
find_best_match_for_name(&[field.name], pat_field.ident.name, None);
|
||||
if let Some(suggested_name) = suggested_name {
|
||||
err.span_suggestion(
|
||||
err.span_suggestion_verbose(
|
||||
pat_field.ident.span,
|
||||
"a field with a similar name exists",
|
||||
suggested_name,
|
||||
|
|
|
|||
|
|
@ -1963,7 +1963,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
|
|||
};
|
||||
(span, msg, suggestion.candidate.to_ident_string())
|
||||
};
|
||||
err.span_suggestion(span, msg, sugg, Applicability::MaybeIncorrect);
|
||||
err.span_suggestion_verbose(span, msg, sugg, Applicability::MaybeIncorrect);
|
||||
true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -570,19 +570,37 @@ error: cannot find attribute `warn_` in this scope
|
|||
--> $DIR/diagnostic-derive.rs:590:3
|
||||
|
|
||||
LL | #[warn_(no_crate_example, code = E0123)]
|
||||
| ^^^^^ help: a built-in attribute with a similar name exists: `warn`
|
||||
| ^^^^^
|
||||
|
|
||||
help: a built-in attribute with a similar name exists
|
||||
|
|
||||
LL - #[warn_(no_crate_example, code = E0123)]
|
||||
LL + #[warn(no_crate_example, code = E0123)]
|
||||
|
|
||||
|
||||
error: cannot find attribute `lint` in this scope
|
||||
--> $DIR/diagnostic-derive.rs:597:3
|
||||
|
|
||||
LL | #[lint(no_crate_example, code = E0123)]
|
||||
| ^^^^ help: a built-in attribute with a similar name exists: `link`
|
||||
| ^^^^
|
||||
|
|
||||
help: a built-in attribute with a similar name exists
|
||||
|
|
||||
LL - #[lint(no_crate_example, code = E0123)]
|
||||
LL + #[link(no_crate_example, code = E0123)]
|
||||
|
|
||||
|
||||
error: cannot find attribute `lint` in this scope
|
||||
--> $DIR/diagnostic-derive.rs:604:3
|
||||
|
|
||||
LL | #[lint(no_crate_example, code = E0123)]
|
||||
| ^^^^ help: a built-in attribute with a similar name exists: `link`
|
||||
| ^^^^
|
||||
|
|
||||
help: a built-in attribute with a similar name exists
|
||||
|
|
||||
LL - #[lint(no_crate_example, code = E0123)]
|
||||
LL + #[link(no_crate_example, code = E0123)]
|
||||
|
|
||||
|
||||
error: cannot find attribute `multipart_suggestion` in this scope
|
||||
--> $DIR/diagnostic-derive.rs:644:3
|
||||
|
|
|
|||
|
|
@ -24,7 +24,13 @@ LL | struct A;
|
|||
| --------- similarly named unit struct `A` defined here
|
||||
...
|
||||
LL | f(A, A, B, C);
|
||||
| ^ help: a unit struct with a similar name exists: `A`
|
||||
| ^
|
||||
|
|
||||
help: a unit struct with a similar name exists
|
||||
|
|
||||
LL - f(A, A, B, C);
|
||||
LL + f(A, A, B, A);
|
||||
|
|
||||
|
||||
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
|
||||
--> $DIR/issue-109831.rs:7:5
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ LL | type Target;
|
|||
| ------------ associated type `Target` defined here
|
||||
...
|
||||
LL | let _: <S as Trait>::Output;
|
||||
| ^^^^^^
|
||||
| |
|
||||
| not found in `Trait`
|
||||
| help: maybe you meant this associated type: `Target`
|
||||
| ^^^^^^ not found in `Trait`
|
||||
|
|
||||
help: maybe you meant this associated type
|
||||
|
|
||||
LL - let _: <S as Trait>::Output;
|
||||
LL + let _: <S as Trait>::Target;
|
||||
|
|
||||
|
||||
error[E0576]: cannot find method or associated constant `BAR` in trait `Trait`
|
||||
--> $DIR/issue-87638.rs:20:27
|
||||
|
|
@ -17,10 +20,13 @@ LL | const FOO: usize;
|
|||
| ----------------- associated constant `FOO` defined here
|
||||
...
|
||||
LL | let _ = <S as Trait>::BAR;
|
||||
| ^^^
|
||||
| |
|
||||
| not found in `Trait`
|
||||
| help: maybe you meant this associated constant: `FOO`
|
||||
| ^^^ not found in `Trait`
|
||||
|
|
||||
help: maybe you meant this associated constant
|
||||
|
|
||||
LL - let _ = <S as Trait>::BAR;
|
||||
LL + let _ = <S as Trait>::FOO;
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ LL | type Output;
|
|||
| ------------ associated type `Output` defined here
|
||||
...
|
||||
LL | <Dst as From<Self>>::Dst
|
||||
| ^^^
|
||||
| |
|
||||
| not found in `From`
|
||||
| help: maybe you meant this associated type: `Output`
|
||||
| ^^^ not found in `From`
|
||||
|
|
||||
help: maybe you meant this associated type
|
||||
|
|
||||
LL - <Dst as From<Self>>::Dst
|
||||
LL + <Dst as From<Self>>::Output
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,13 @@ error[E0576]: cannot find associated type `X` in trait `A`
|
|||
LL | type Output;
|
||||
| ------------ associated type `Output` defined here
|
||||
LL | fn a(&self) -> <Self as A>::X;
|
||||
| ^
|
||||
| |
|
||||
| not found in `A`
|
||||
| help: maybe you meant this associated type: `Output`
|
||||
| ^ not found in `A`
|
||||
|
|
||||
help: maybe you meant this associated type
|
||||
|
|
||||
LL - fn a(&self) -> <Self as A>::X;
|
||||
LL + fn a(&self) -> <Self as A>::Output;
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@ error[E0425]: cannot find type `usize8` in this scope
|
|||
--> $DIR/align-on-fields-143987.rs:17:8
|
||||
|
|
||||
LL | x: usize8,
|
||||
| ^^^^^^ help: a builtin type with a similar name exists: `usize`
|
||||
| ^^^^^^
|
||||
|
|
||||
help: a builtin type with a similar name exists
|
||||
|
|
||||
LL - x: usize8,
|
||||
LL + x: usize,
|
||||
|
|
||||
|
||||
error: `#[rustc_align]` attribute cannot be used on struct fields
|
||||
--> $DIR/align-on-fields-143987.rs:10:5
|
||||
|
|
|
|||
|
|
@ -2,19 +2,23 @@ error[E0433]: failed to resolve: use of undeclared type `E`
|
|||
--> $DIR/non-ADT-struct-pattern-box-pattern-ice-121463.rs:6:17
|
||||
|
|
||||
LL | let mut a = E::StructVar { boxed: Box::new(5_i32) };
|
||||
| ^
|
||||
| |
|
||||
| use of undeclared type `E`
|
||||
| help: a trait with a similar name exists: `Eq`
|
||||
| ^ use of undeclared type `E`
|
||||
|
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | let mut a = Eq::StructVar { boxed: Box::new(5_i32) };
|
||||
| +
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared type `E`
|
||||
--> $DIR/non-ADT-struct-pattern-box-pattern-ice-121463.rs:9:9
|
||||
|
|
||||
LL | E::StructVar { box boxed } => { }
|
||||
| ^
|
||||
| |
|
||||
| use of undeclared type `E`
|
||||
| help: a trait with a similar name exists: `Eq`
|
||||
| ^ use of undeclared type `E`
|
||||
|
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | Eq::StructVar { box boxed } => { }
|
||||
| +
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@ error[E0425]: cannot find type `n` in this scope
|
|||
--> $DIR/issue-90871.rs:4:22
|
||||
|
|
||||
LL | type_ascribe!(2, n([u8; || 1]))
|
||||
| ^ help: a trait with a similar name exists: `Fn`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Fn` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | type_ascribe!(2, Fn([u8; || 1]))
|
||||
| +
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-90871.rs:4:29
|
||||
|
|
|
|||
|
|
@ -11,7 +11,13 @@ error[E0425]: cannot find type `D` in this scope
|
|||
| ----------- similarly named type alias `A` defined here
|
||||
...
|
||||
7 | type C = D;
|
||||
| ^ help: a type alias with a similar name exists: `A`
|
||||
| ^
|
||||
|
|
||||
help: a type alias with a similar name exists
|
||||
|
|
||||
7 - type C = D;
|
||||
7 + type C = A;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `F` in this scope
|
||||
--> $DIR/ui-testing-optout.rs:92:10
|
||||
|
|
@ -20,7 +26,13 @@ error[E0425]: cannot find type `F` in this scope
|
|||
| ----------- similarly named type alias `A` defined here
|
||||
...
|
||||
92 | type E = F;
|
||||
| ^ help: a type alias with a similar name exists: `A`
|
||||
| ^
|
||||
|
|
||||
help: a type alias with a similar name exists
|
||||
|
|
||||
92 - type E = F;
|
||||
92 + type E = A;
|
||||
|
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,15 @@ error[E0425]: cannot find value `x` in this scope
|
|||
--> $DIR/error_in_ty.rs:6:31
|
||||
|
|
||||
LL | pub struct A<const z: [usize; x]> {}
|
||||
| - ^ help: a const parameter with a similar name exists: `z`
|
||||
| - ^
|
||||
| |
|
||||
| similarly named const parameter `z` defined here
|
||||
|
|
||||
help: a const parameter with a similar name exists
|
||||
|
|
||||
LL - pub struct A<const z: [usize; x]> {}
|
||||
LL + pub struct A<const z: [usize; z]> {}
|
||||
|
|
||||
|
||||
error: `[usize; x]` is forbidden as the type of a const generic parameter
|
||||
--> $DIR/error_in_ty.rs:6:23
|
||||
|
|
|
|||
|
|
@ -20,7 +20,13 @@ LL | pub type v11 = [[usize; v4]; v4];
|
|||
| --------------------------------- similarly named type alias `v11` defined here
|
||||
...
|
||||
LL | pub const fn v21() -> v18 {}
|
||||
| ^^^ help: a type alias with a similar name exists: `v11`
|
||||
| ^^^
|
||||
|
|
||||
help: a type alias with a similar name exists
|
||||
|
|
||||
LL - pub const fn v21() -> v18 {}
|
||||
LL + pub const fn v21() -> v11 {}
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `v18` in this scope
|
||||
--> $DIR/unevaluated-const-ice-119731.rs:35:31
|
||||
|
|
@ -29,7 +35,13 @@ LL | pub type v11 = [[usize; v4]; v4];
|
|||
| --------------------------------- similarly named type alias `v11` defined here
|
||||
...
|
||||
LL | pub const fn v21() -> v18 {
|
||||
| ^^^ help: a type alias with a similar name exists: `v11`
|
||||
| ^^^
|
||||
|
|
||||
help: a type alias with a similar name exists
|
||||
|
|
||||
LL - pub const fn v21() -> v18 {
|
||||
LL + pub const fn v21() -> v11 {
|
||||
|
|
||||
|
||||
error[E0422]: cannot find struct, variant or union type `v18` in this scope
|
||||
--> $DIR/unevaluated-const-ice-119731.rs:37:13
|
||||
|
|
@ -38,7 +50,13 @@ LL | pub type v11 = [[usize; v4]; v4];
|
|||
| --------------------------------- similarly named type alias `v11` defined here
|
||||
...
|
||||
LL | v18 { _p: () }
|
||||
| ^^^ help: a type alias with a similar name exists: `v11`
|
||||
| ^^^
|
||||
|
|
||||
help: a type alias with a similar name exists
|
||||
|
|
||||
LL - v18 { _p: () }
|
||||
LL + v11 { _p: () }
|
||||
|
|
||||
|
||||
warning: type `v11` should have an upper camel case name
|
||||
--> $DIR/unevaluated-const-ice-119731.rs:9:14
|
||||
|
|
|
|||
|
|
@ -8,9 +8,15 @@ error[E0425]: cannot find value `B` in this scope
|
|||
--> $DIR/parent_generics_of_nested_in_default.rs:1:30
|
||||
|
|
||||
LL | impl<const A: i32 = { || [0; B] }> Tr {}
|
||||
| - ^ help: a const parameter with a similar name exists: `A`
|
||||
| - ^
|
||||
| |
|
||||
| similarly named const parameter `A` defined here
|
||||
|
|
||||
help: a const parameter with a similar name exists
|
||||
|
|
||||
LL - impl<const A: i32 = { || [0; B] }> Tr {}
|
||||
LL + impl<const A: i32 = { || [0; A] }> Tr {}
|
||||
|
|
||||
|
||||
error: defaults for generic parameters are not allowed here
|
||||
--> $DIR/parent_generics_of_nested_in_default.rs:1:6
|
||||
|
|
|
|||
|
|
@ -22,10 +22,16 @@ error[E0425]: cannot find function `value` in this scope
|
|||
--> $DIR/ice-unhandled-type-122191.rs:9:5
|
||||
|
|
||||
LL | value()
|
||||
| ^^^^^ help: a constant with a similar name exists: `VALUE`
|
||||
| ^^^^^
|
||||
...
|
||||
LL | const VALUE: Foo = foo();
|
||||
| ------------------------- similarly named constant `VALUE` defined here
|
||||
|
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL - value()
|
||||
LL + VALUE()
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/ice-unhandled-type-122191.rs:17:9
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ LL | struct S(u8);
|
|||
| ------------- similarly named tuple struct `S` defined here
|
||||
...
|
||||
LL | let C(a) = S(11);
|
||||
| ^ help: a tuple struct with a similar name exists: `S`
|
||||
| ^
|
||||
|
|
||||
help: a tuple struct with a similar name exists
|
||||
|
|
||||
LL - let C(a) = S(11);
|
||||
LL + let S(a) = S(11);
|
||||
|
|
||||
|
||||
error[E0532]: expected tuple struct or tuple variant, found constant `C`
|
||||
--> $DIR/const-pattern-rewrite-error-32086.rs:7:9
|
||||
|
|
@ -14,7 +20,13 @@ LL | struct S(u8);
|
|||
| ------------- similarly named tuple struct `S` defined here
|
||||
...
|
||||
LL | let C(..) = S(11);
|
||||
| ^ help: a tuple struct with a similar name exists: `S`
|
||||
| ^
|
||||
|
|
||||
help: a tuple struct with a similar name exists
|
||||
|
|
||||
LL - let C(..) = S(11);
|
||||
LL + let S(..) = S(11);
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,13 @@ LL | fn bar() {}
|
|||
| -------- similarly named associated function `bar` defined here
|
||||
...
|
||||
LL | reuse <F as Trait>::baz;
|
||||
| ^^^ help: an associated function with a similar name exists: `bar`
|
||||
| ^^^
|
||||
|
|
||||
help: an associated function with a similar name exists
|
||||
|
|
||||
LL - reuse <F as Trait>::baz;
|
||||
LL + reuse <F as Trait>::bar;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find function `foo` in this scope
|
||||
--> $DIR/bad-resolve.rs:35:11
|
||||
|
|
@ -68,7 +74,13 @@ LL | fn foo(&self, x: i32) -> i32 { x }
|
|||
| ---------------------------- similarly named associated function `foo` defined here
|
||||
...
|
||||
LL | reuse Trait::foo2 { self.0 }
|
||||
| ^^^^ help: an associated function with a similar name exists: `foo`
|
||||
| ^^^^
|
||||
|
|
||||
help: an associated function with a similar name exists
|
||||
|
|
||||
LL - reuse Trait::foo2 { self.0 }
|
||||
LL + reuse Trait::foo { self.0 }
|
||||
|
|
||||
|
||||
error[E0046]: not all trait items implemented, missing: `Type`
|
||||
--> $DIR/bad-resolve.rs:22:1
|
||||
|
|
|
|||
|
|
@ -2,23 +2,33 @@ error: cannot find derive macro `Eqr` in this scope
|
|||
--> $DIR/deriving-meta-unknown-trait.rs:1:10
|
||||
|
|
||||
LL | #[derive(Eqr)]
|
||||
| ^^^ help: a derive macro with a similar name exists: `Eq`
|
||||
| ^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named derive macro `Eq` defined here
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(Eqr)]
|
||||
LL + #[derive(Eq)]
|
||||
|
|
||||
|
||||
error: cannot find derive macro `Eqr` in this scope
|
||||
--> $DIR/deriving-meta-unknown-trait.rs:1:10
|
||||
|
|
||||
LL | #[derive(Eqr)]
|
||||
| ^^^ help: a derive macro with a similar name exists: `Eq`
|
||||
| ^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named derive macro `Eq` defined here
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(Eqr)]
|
||||
LL + #[derive(Eq)]
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@ error: cannot find macro `prinltn` in this scope
|
|||
--> $DIR/println-typo.rs:4:5
|
||||
|
|
||||
LL | prinltn!();
|
||||
| ^^^^^^^ help: a macro with a similar name exists: `println`
|
||||
| ^^^^^^^
|
||||
|
|
||||
--> $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
|
|
||||
= note: similarly named macro `println` defined here
|
||||
help: a macro with a similar name exists
|
||||
|
|
||||
LL - prinltn!();
|
||||
LL + println!();
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ LL | struct TyUint {}
|
|||
| ------------- similarly named struct `TyUint` defined here
|
||||
...
|
||||
LL | TyUInt {};
|
||||
| ^^^^^^ help: a struct with a similar name exists (notice the capitalization): `TyUint`
|
||||
| ^^^^^^
|
||||
|
|
||||
help: a struct with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - TyUInt {};
|
||||
LL + TyUint {};
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,13 @@ LL | fn a() {
|
|||
| ------ similarly named function `a` defined here
|
||||
...
|
||||
LL | if (i + j) = i {}
|
||||
| ^ help: a function with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - if (i + j) = i {}
|
||||
LL + if (a + j) = i {}
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `j` in this scope
|
||||
--> $DIR/bad-if-let-suggestion.rs:9:13
|
||||
|
|
@ -36,7 +42,13 @@ LL | fn a() {
|
|||
| ------ similarly named function `a` defined here
|
||||
...
|
||||
LL | if (i + j) = i {}
|
||||
| ^ help: a function with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - if (i + j) = i {}
|
||||
LL + if (i + a) = i {}
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `i` in this scope
|
||||
--> $DIR/bad-if-let-suggestion.rs:9:18
|
||||
|
|
@ -45,7 +57,13 @@ LL | fn a() {
|
|||
| ------ similarly named function `a` defined here
|
||||
...
|
||||
LL | if (i + j) = i {}
|
||||
| ^ help: a function with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - if (i + j) = i {}
|
||||
LL + if (i + j) = a {}
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/bad-if-let-suggestion.rs:16:8
|
||||
|
|
@ -54,7 +72,13 @@ LL | fn a() {
|
|||
| ------ similarly named function `a` defined here
|
||||
...
|
||||
LL | if x[0] = 1 {}
|
||||
| ^ help: a function with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - if x[0] = 1 {}
|
||||
LL + if a[0] = 1 {}
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/bad-if-let-suggestion.rs:2:8
|
||||
|
|
|
|||
|
|
@ -14,31 +14,61 @@ error[E0425]: cannot find value `b` in this scope
|
|||
--> $DIR/format-args-capture-issue-102057.rs:9:22
|
||||
|
|
||||
LL | format!("\x7Ba} {b}");
|
||||
| ^ help: a local variable with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - format!("\x7Ba} {b}");
|
||||
LL + format!("\x7Ba} {a}");
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `b` in this scope
|
||||
--> $DIR/format-args-capture-issue-102057.rs:11:25
|
||||
|
|
||||
LL | format!("\x7Ba\x7D {b}");
|
||||
| ^ help: a local variable with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - format!("\x7Ba\x7D {b}");
|
||||
LL + format!("\x7Ba\x7D {a}");
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `b` in this scope
|
||||
--> $DIR/format-args-capture-issue-102057.rs:13:25
|
||||
|
|
||||
LL | format!("\x7Ba} \x7Bb}");
|
||||
| ^ help: a local variable with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - format!("\x7Ba} \x7Bb}");
|
||||
LL + format!("\x7Ba} \x7Ba}");
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `b` in this scope
|
||||
--> $DIR/format-args-capture-issue-102057.rs:15:28
|
||||
|
|
||||
LL | format!("\x7Ba\x7D \x7Bb}");
|
||||
| ^ help: a local variable with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - format!("\x7Ba\x7D \x7Bb}");
|
||||
LL + format!("\x7Ba\x7D \x7Ba}");
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `b` in this scope
|
||||
--> $DIR/format-args-capture-issue-102057.rs:17:28
|
||||
|
|
||||
LL | format!("\x7Ba\x7D \x7Bb\x7D");
|
||||
| ^ help: a local variable with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - format!("\x7Ba\x7D \x7Bb\x7D");
|
||||
LL + format!("\x7Ba\x7D \x7Ba\x7D");
|
||||
|
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,13 @@ error[E0425]: cannot find value `foo` in this scope
|
|||
LL | const FOO: i32 = 123;
|
||||
| --------------------- similarly named constant `FOO` defined here
|
||||
LL | println!("{foo:X}");
|
||||
| ^^^ help: a constant with a similar name exists (notice the capitalization): `FOO`
|
||||
| ^^^
|
||||
|
|
||||
help: a constant with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - println!("{foo:X}");
|
||||
LL + println!("{FOO:X}");
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `foo` in this scope
|
||||
--> $DIR/format-args-capture-issue-94010.rs:5:18
|
||||
|
|
@ -13,7 +19,13 @@ LL | const FOO: i32 = 123;
|
|||
| --------------------- similarly named constant `FOO` defined here
|
||||
...
|
||||
LL | println!("{:.foo$}", 0);
|
||||
| ^^^ help: a constant with a similar name exists (notice the capitalization): `FOO`
|
||||
| ^^^
|
||||
|
|
||||
help: a constant with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - println!("{:.foo$}", 0);
|
||||
LL + println!("{:.FOO$}", 0);
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -114,28 +114,46 @@ error[E0425]: cannot find type `A` in this scope
|
|||
--> $DIR/equality-bound.rs:20:79
|
||||
|
|
||||
LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
|
||||
| ^ help: a struct with a similar name exists: `K`
|
||||
| ^
|
||||
...
|
||||
LL | struct K {}
|
||||
| -------- similarly named struct `K` defined here
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = A,
|
||||
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator, IntoIterator::Item = K,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `A` in this scope
|
||||
--> $DIR/equality-bound.rs:31:68
|
||||
|
|
||||
LL | fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
|
||||
| ^ help: a struct with a similar name exists: `K`
|
||||
| ^
|
||||
...
|
||||
LL | struct K {}
|
||||
| -------- similarly named struct `K` defined here
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL - fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = A,
|
||||
LL + fn from_iter<T>(_: T) -> Self where T: IntoIterator, T::Item = K,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `A` in this scope
|
||||
--> $DIR/equality-bound.rs:42:76
|
||||
|
|
||||
LL | fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
|
||||
| ^ help: a struct with a similar name exists: `K`
|
||||
| ^
|
||||
...
|
||||
LL | struct K {}
|
||||
| -------- similarly named struct `K` defined here
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL - fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = A,
|
||||
LL + fn from_iter<T: IntoIterator>(_: T) -> Self where IntoIterator::Item = K,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `A` in this scope
|
||||
--> $DIR/equality-bound.rs:53:65
|
||||
|
|
@ -144,7 +162,13 @@ LL | struct K {}
|
|||
| -------- similarly named struct `K` defined here
|
||||
...
|
||||
LL | fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
|
||||
| ^ help: a struct with a similar name exists: `K`
|
||||
| ^
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL - fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = A,
|
||||
LL + fn from_iter<T: IntoIterator>(_: T) -> Self where T::Item = K,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `A` in this scope
|
||||
--> $DIR/equality-bound.rs:64:62
|
||||
|
|
@ -153,7 +177,13 @@ LL | struct K {}
|
|||
| -------- similarly named struct `K` defined here
|
||||
...
|
||||
LL | fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
|
||||
| ^ help: a struct with a similar name exists: `K`
|
||||
| ^
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL - fn from_iter<T>(_: T) -> Self where IntoIterator::Item = A, T: IntoIterator,
|
||||
LL + fn from_iter<T>(_: T) -> Self where IntoIterator::Item = K, T: IntoIterator,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `A` in this scope
|
||||
--> $DIR/equality-bound.rs:75:51
|
||||
|
|
@ -162,16 +192,25 @@ LL | struct K {}
|
|||
| -------- similarly named struct `K` defined here
|
||||
...
|
||||
LL | fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
|
||||
| ^ help: a struct with a similar name exists: `K`
|
||||
| ^
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL - fn from_iter<T>(_: T) -> Self where T::Item = A, T: IntoIterator,
|
||||
LL + fn from_iter<T>(_: T) -> Self where T::Item = K, T: IntoIterator,
|
||||
|
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared type `I`
|
||||
--> $DIR/equality-bound.rs:9:41
|
||||
|
|
||||
LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
|
||||
| ^
|
||||
| |
|
||||
| use of undeclared type `I`
|
||||
| help: a type parameter with a similar name exists: `J`
|
||||
| ^ use of undeclared type `I`
|
||||
|
|
||||
help: a type parameter with a similar name exists
|
||||
|
|
||||
LL - fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
|
||||
LL + fn sum3<J: Iterator>(i: J) -> i32 where J::Item = i32 {
|
||||
|
|
||||
|
||||
error: aborting due to 16 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,13 @@ LL | struct SemiOpaque;
|
|||
| ------------------ similarly named unit struct `SemiOpaque` defined here
|
||||
...
|
||||
LL | semiopaque;
|
||||
| ^^^^^^^^^^
|
||||
| |
|
||||
| not a value
|
||||
| help: a unit struct with a similar name exists (notice the capitalization): `SemiOpaque`
|
||||
| ^^^^^^^^^^ not a value
|
||||
|
|
||||
help: a unit struct with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - semiopaque;
|
||||
LL + SemiOpaque;
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found macro `opaque`
|
||||
--> $DIR/rustc-macro-transparency.rs:30:5
|
||||
|
|
|
|||
|
|
@ -75,13 +75,18 @@ LL | pub enum B {
|
|||
| ---------- similarly named enum `B` defined here
|
||||
...
|
||||
LL | foo::<A>();
|
||||
| ^ help: an enum with a similar name exists: `B`
|
||||
| ^
|
||||
|
|
||||
note: enum `bar::A` exists but is inaccessible
|
||||
--> $DIR/glob-resolve1.rs:12:5
|
||||
|
|
||||
LL | enum A {
|
||||
| ^^^^^^ not accessible
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - foo::<A>();
|
||||
LL + foo::<B>();
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `C` in this scope
|
||||
--> $DIR/glob-resolve1.rs:34:11
|
||||
|
|
@ -90,13 +95,18 @@ LL | pub enum B {
|
|||
| ---------- similarly named enum `B` defined here
|
||||
...
|
||||
LL | foo::<C>();
|
||||
| ^ help: an enum with a similar name exists: `B`
|
||||
| ^
|
||||
|
|
||||
note: struct `bar::C` exists but is inaccessible
|
||||
--> $DIR/glob-resolve1.rs:19:5
|
||||
|
|
||||
LL | struct C;
|
||||
| ^^^^^^^^^ not accessible
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - foo::<C>();
|
||||
LL + foo::<B>();
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `D` in this scope
|
||||
--> $DIR/glob-resolve1.rs:35:11
|
||||
|
|
@ -105,13 +115,18 @@ LL | pub enum B {
|
|||
| ---------- similarly named enum `B` defined here
|
||||
...
|
||||
LL | foo::<D>();
|
||||
| ^ help: an enum with a similar name exists: `B`
|
||||
| ^
|
||||
|
|
||||
note: type alias `bar::D` exists but is inaccessible
|
||||
--> $DIR/glob-resolve1.rs:21:5
|
||||
|
|
||||
LL | type D = isize;
|
||||
| ^^^^^^^^^^^^^^^ not accessible
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - foo::<D>();
|
||||
LL + foo::<B>();
|
||||
|
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,16 @@ error[E0425]: cannot find type `i` in this scope
|
|||
--> $DIR/macro-context.rs:3:13
|
||||
|
|
||||
LL | () => ( i ; typeof );
|
||||
| ^ help: a builtin type with a similar name exists: `i8`
|
||||
| ^
|
||||
...
|
||||
LL | let a: m!();
|
||||
| ---- in this macro invocation
|
||||
|
|
||||
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a builtin type with a similar name exists
|
||||
|
|
||||
LL | () => ( i8 ; typeof );
|
||||
| +
|
||||
|
||||
error[E0425]: cannot find value `i` in this scope
|
||||
--> $DIR/macro-context.rs:3:13
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@ error: cannot find macro `printlx` in this scope
|
|||
--> $DIR/macro-name-typo.rs:2:5
|
||||
|
|
||||
LL | printlx!("oh noes!");
|
||||
| ^^^^^^^ help: a macro with a similar name exists: `println`
|
||||
| ^^^^^^^
|
||||
|
|
||||
--> $SRC_DIR/std/src/macros.rs:LL:COL
|
||||
|
|
||||
= note: similarly named macro `println` defined here
|
||||
help: a macro with a similar name exists
|
||||
|
|
||||
LL - printlx!("oh noes!");
|
||||
LL + println!("oh noes!");
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,18 @@ error: cannot find macro `inline` in this scope
|
|||
--> $DIR/macro-path-prelude-fail-3.rs:2:5
|
||||
|
|
||||
LL | inline!();
|
||||
| ^^^^^^ help: a macro with a similar name exists: `line`
|
||||
| ^^^^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
|
|
||||
= note: similarly named macro `line` defined here
|
||||
|
|
||||
= note: `inline` is in scope, but it is an attribute: `#[inline]`
|
||||
help: a macro with a similar name exists
|
||||
|
|
||||
LL - inline!();
|
||||
LL + line!();
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,13 @@ error: cannot find attribute `macro_reexport` in this scope
|
|||
--> $DIR/macro-reexport-removed.rs:5:3
|
||||
|
|
||||
LL | #[macro_reexport(macro_one)]
|
||||
| ^^^^^^^^^^^^^^ help: a built-in attribute with a similar name exists: `macro_export`
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
help: a built-in attribute with a similar name exists
|
||||
|
|
||||
LL - #[macro_reexport(macro_one)]
|
||||
LL + #[macro_export(macro_one)]
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@ LL | macro_rules! kl {
|
|||
| --------------- similarly named macro `kl` defined here
|
||||
...
|
||||
LL | k!();
|
||||
| ^ help: a macro with a similar name exists: `kl`
|
||||
| ^
|
||||
|
|
||||
help: a macro with a similar name exists
|
||||
|
|
||||
LL | kl!();
|
||||
| +
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,13 @@ LL | fn i_like_to_😅_a_lot() -> 👀 {
|
|||
| ----------------------------- similarly named function `i_like_to_😅_a_lot` defined here
|
||||
...
|
||||
LL | let _ = i_like_to_😄_a_lot() ➖ 4;
|
||||
| ^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `i_like_to_😅_a_lot`
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - let _ = i_like_to_😄_a_lot() ➖ 4;
|
||||
LL + let _ = i_like_to_😅_a_lot() ➖ 4;
|
||||
|
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -94,37 +94,61 @@ error[E0405]: cannot find trait `r#struct` in this scope
|
|||
--> $DIR/kw-in-trait-bounds.rs:16:10
|
||||
|
|
||||
LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
|
||||
| ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
|
||||
| ^^^^^^
|
||||
...
|
||||
LL | trait Struct {}
|
||||
| ------------ similarly named trait `Struct` defined here
|
||||
|
|
||||
help: a trait with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
|
||||
LL + fn _g<A: Struct, B>(_: impl struct, _: &dyn struct)
|
||||
|
|
||||
|
||||
error[E0405]: cannot find trait `r#struct` in this scope
|
||||
--> $DIR/kw-in-trait-bounds.rs:30:8
|
||||
|
|
||||
LL | B: struct,
|
||||
| ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
|
||||
| ^^^^^^
|
||||
...
|
||||
LL | trait Struct {}
|
||||
| ------------ similarly named trait `Struct` defined here
|
||||
|
|
||||
help: a trait with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - B: struct,
|
||||
LL + B: Struct,
|
||||
|
|
||||
|
||||
error[E0405]: cannot find trait `r#struct` in this scope
|
||||
--> $DIR/kw-in-trait-bounds.rs:16:29
|
||||
|
|
||||
LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
|
||||
| ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
|
||||
| ^^^^^^
|
||||
...
|
||||
LL | trait Struct {}
|
||||
| ------------ similarly named trait `Struct` defined here
|
||||
|
|
||||
help: a trait with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
|
||||
LL + fn _g<A: struct, B>(_: impl Struct, _: &dyn struct)
|
||||
|
|
||||
|
||||
error[E0405]: cannot find trait `r#struct` in this scope
|
||||
--> $DIR/kw-in-trait-bounds.rs:16:45
|
||||
|
|
||||
LL | fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
|
||||
| ^^^^^^ help: a trait with a similar name exists (notice the capitalization): `Struct`
|
||||
| ^^^^^^
|
||||
...
|
||||
LL | trait Struct {}
|
||||
| ------------ similarly named trait `Struct` defined here
|
||||
|
|
||||
help: a trait with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - fn _g<A: struct, B>(_: impl struct, _: &dyn struct)
|
||||
LL + fn _g<A: struct, B>(_: impl struct, _: &dyn Struct)
|
||||
|
|
||||
|
||||
error: aborting due to 12 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,13 @@ LL | fn a() {
|
|||
| ------ similarly named function `a` defined here
|
||||
...
|
||||
LL | f(&raw 2);
|
||||
| ^ help: a function with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - f(&raw 2);
|
||||
LL + a(&raw 2);
|
||||
|
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,13 @@ error[E0026]: variant `A::A` does not have a field named `fob`
|
|||
--> $DIR/match-enum-struct-variant-field-missing.rs:12:16
|
||||
|
|
||||
LL | A::A { fob } => {
|
||||
| ^^^
|
||||
| |
|
||||
| variant `A::A` does not have this field
|
||||
| help: a field with a similar name exists: `foo`
|
||||
| ^^^ variant `A::A` does not have this field
|
||||
|
|
||||
help: a field with a similar name exists
|
||||
|
|
||||
LL - A::A { fob } => {
|
||||
LL + A::A { foo } => {
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -56,10 +56,13 @@ error[E0433]: failed to resolve: use of undeclared type `E`
|
|||
--> $DIR/pattern-error-continue.rs:35:9
|
||||
|
|
||||
LL | E::V => {}
|
||||
| ^
|
||||
| |
|
||||
| use of undeclared type `E`
|
||||
| help: an enum with a similar name exists: `A`
|
||||
| ^ use of undeclared type `E`
|
||||
|
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - E::V => {}
|
||||
LL + A::V => {}
|
||||
|
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -38,43 +38,85 @@ error[E0425]: cannot find value `x` in this scope
|
|||
--> $DIR/name-resolution.rs:10:34
|
||||
|
|
||||
LL | fn bad_fn_item_1(x: bool, ((y if x) | y): bool) {}
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - fn bad_fn_item_1(x: bool, ((y if x) | y): bool) {}
|
||||
LL + fn bad_fn_item_1(x: bool, ((y if y) | y): bool) {}
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `y` in this scope
|
||||
--> $DIR/name-resolution.rs:12:25
|
||||
|
|
||||
LL | fn bad_fn_item_2(((x if y) | x): bool, y: bool) {}
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - fn bad_fn_item_2(((x if y) | x): bool, y: bool) {}
|
||||
LL + fn bad_fn_item_2(((x if x) | x): bool, y: bool) {}
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/name-resolution.rs:20:18
|
||||
|
|
||||
LL | (x, y if x) => x && y,
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - (x, y if x) => x && y,
|
||||
LL + (x, y if y) => x && y,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `y` in this scope
|
||||
--> $DIR/name-resolution.rs:22:15
|
||||
|
|
||||
LL | (x if y, y) => x && y,
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - (x if y, y) => x && y,
|
||||
LL + (x if x, y) => x && y,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/name-resolution.rs:29:20
|
||||
|
|
||||
LL | (x @ (y if x),) => x && y,
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - (x @ (y if x),) => x && y,
|
||||
LL + (x @ (y if y),) => x && y,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `y` in this scope
|
||||
--> $DIR/name-resolution.rs:37:20
|
||||
|
|
||||
LL | ((Ok(x) if y) | (Err(y) if x),) => x && y,
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - ((Ok(x) if y) | (Err(y) if x),) => x && y,
|
||||
LL + ((Ok(x) if x) | (Err(y) if x),) => x && y,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/name-resolution.rs:37:36
|
||||
|
|
||||
LL | ((Ok(x) if y) | (Err(y) if x),) => x && y,
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - ((Ok(x) if y) | (Err(y) if x),) => x && y,
|
||||
LL + ((Ok(x) if y) | (Err(y) if y),) => x && y,
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `nonexistent` in this scope
|
||||
--> $DIR/name-resolution.rs:44:15
|
||||
|
|
@ -86,49 +128,97 @@ error[E0425]: cannot find value `x` in this scope
|
|||
--> $DIR/name-resolution.rs:46:22
|
||||
|
|
||||
LL | if let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - if let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
LL + if let ((x, y if y) | (x if y, y)) = (true, true) { x && y; }
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `y` in this scope
|
||||
--> $DIR/name-resolution.rs:46:33
|
||||
|
|
||||
LL | if let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - if let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
LL + if let ((x, y if x) | (x if x, y)) = (true, true) { x && y; }
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/name-resolution.rs:49:25
|
||||
|
|
||||
LL | while let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - while let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
LL + while let ((x, y if y) | (x if y, y)) = (true, true) { x && y; }
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `y` in this scope
|
||||
--> $DIR/name-resolution.rs:49:36
|
||||
|
|
||||
LL | while let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - while let ((x, y if x) | (x if y, y)) = (true, true) { x && y; }
|
||||
LL + while let ((x, y if x) | (x if x, y)) = (true, true) { x && y; }
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/name-resolution.rs:52:19
|
||||
|
|
||||
LL | for ((x, y if x) | (x if y, y)) in [(true, true)] { x && y; }
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - for ((x, y if x) | (x if y, y)) in [(true, true)] { x && y; }
|
||||
LL + for ((x, y if y) | (x if y, y)) in [(true, true)] { x && y; }
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `y` in this scope
|
||||
--> $DIR/name-resolution.rs:52:30
|
||||
|
|
||||
LL | for ((x, y if x) | (x if y, y)) in [(true, true)] { x && y; }
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - for ((x, y if x) | (x if y, y)) in [(true, true)] { x && y; }
|
||||
LL + for ((x, y if x) | (x if x, y)) in [(true, true)] { x && y; }
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `y` in this scope
|
||||
--> $DIR/name-resolution.rs:57:13
|
||||
|
|
||||
LL | (|(x if y), (y if x)| x && y)(true, true);
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - (|(x if y), (y if x)| x && y)(true, true);
|
||||
LL + (|(x if x), (y if x)| x && y)(true, true);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `x` in this scope
|
||||
--> $DIR/name-resolution.rs:57:23
|
||||
|
|
||||
LL | (|(x if y), (y if x)| x && y)(true, true);
|
||||
| ^ help: a local variable with a similar name exists: `y`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - (|(x if y), (y if x)| x && y)(true, true);
|
||||
LL + (|(x if y), (y if y)| x && y)(true, true);
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/name-resolution.rs:75:18
|
||||
|
|
|
|||
|
|
@ -20,7 +20,13 @@ error[E0425]: cannot find value `a` in this scope
|
|||
LL | if let Foo::Bar { .. } = x {
|
||||
| --------------- this pattern doesn't include `a`, which is available in `Bar`
|
||||
LL | println!("{a}");
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{a}");
|
||||
LL + println!("{x}");
|
||||
|
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ error[E0425]: cannot find value `local_use` in this scope
|
|||
--> $DIR/gen-macro-rules-hygiene.rs:13:1
|
||||
|
|
||||
LL | gen_macro_rules!();
|
||||
| ^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
LL | generated!();
|
||||
| ------------ in this macro invocation
|
||||
|
|
@ -24,12 +24,17 @@ help: an identifier with the same name exists, but is not accessible due to macr
|
|||
LL | let local_use = 1;
|
||||
| ^^^^^^^^^
|
||||
= note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - gen_macro_rules!();
|
||||
LL + local_def;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `local_def` in this scope
|
||||
--> $DIR/gen-macro-rules-hygiene.rs:22:9
|
||||
|
|
||||
LL | local_def;
|
||||
| ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: an identifier with the same name is defined here, but is not accessible due to macro hygiene
|
||||
--> $DIR/gen-macro-rules-hygiene.rs:13:1
|
||||
|
|
@ -40,6 +45,11 @@ LL | gen_macro_rules!();
|
|||
LL | generated!();
|
||||
| ------------ in this macro invocation
|
||||
= note: this error originates in the macro `generated` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - local_def;
|
||||
LL + local_use;
|
||||
|
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,14 @@ error[E0425]: cannot find value `foobar2` in this scope
|
|||
--> $DIR/lints_in_proc_macros.rs:10:5
|
||||
|
|
||||
LL | bang_proc_macro2!();
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar`
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the macro `bang_proc_macro2` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - bang_proc_macro2!();
|
||||
LL + foobar;
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ error[E0425]: cannot find value `local_use` in this scope
|
|||
--> $DIR/mixed-site-span.rs:23:9
|
||||
|
|
||||
LL | proc_macro_rules!();
|
||||
| ^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `local_def`
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: an identifier with the same name exists, but is not accessible due to macro hygiene
|
||||
--> $DIR/mixed-site-span.rs:22:13
|
||||
|
|
@ -600,12 +600,17 @@ help: an identifier with the same name exists, but is not accessible due to macr
|
|||
LL | let local_use = 1;
|
||||
| ^^^^^^^^^
|
||||
= note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - proc_macro_rules!();
|
||||
LL + local_def;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `local_def` in this scope
|
||||
--> $DIR/mixed-site-span.rs:28:9
|
||||
|
|
||||
LL | local_def;
|
||||
| ^^^^^^^^^ help: a local variable with a similar name exists: `local_use`
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: an identifier with the same name is defined here, but is not accessible due to macro hygiene
|
||||
--> $DIR/mixed-site-span.rs:23:9
|
||||
|
|
@ -613,6 +618,11 @@ help: an identifier with the same name is defined here, but is not accessible du
|
|||
LL | proc_macro_rules!();
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `proc_macro_rules` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - local_def;
|
||||
LL + local_use;
|
||||
|
|
||||
|
||||
error: aborting due to 52 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ error[E0425]: cannot find value `ok` in this scope
|
|||
--> $DIR/parent-source-spans.rs:30:5
|
||||
|
|
||||
LL | parent_source_spans!($($tokens)*);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
LL | one!("hello", "world");
|
||||
| ---------------------- in this macro invocation
|
||||
|
|
@ -150,12 +150,17 @@ LL | one!("hello", "world");
|
|||
= note: similarly named tuple variant `Ok` defined here
|
||||
|
|
||||
= note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `one` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a tuple variant with a similar name exists
|
||||
|
|
||||
LL - parent_source_spans!($($tokens)*);
|
||||
LL + Ok;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `ok` in this scope
|
||||
--> $DIR/parent-source-spans.rs:30:5
|
||||
|
|
||||
LL | parent_source_spans!($($tokens)*);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
LL | two!("yay", "rust");
|
||||
| ------------------- in this macro invocation
|
||||
|
|
@ -165,12 +170,17 @@ LL | two!("yay", "rust");
|
|||
= note: similarly named tuple variant `Ok` defined here
|
||||
|
|
||||
= note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `two` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a tuple variant with a similar name exists
|
||||
|
|
||||
LL - parent_source_spans!($($tokens)*);
|
||||
LL + Ok;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `ok` in this scope
|
||||
--> $DIR/parent-source-spans.rs:30:5
|
||||
|
|
||||
LL | parent_source_spans!($($tokens)*);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
...
|
||||
LL | three!("hip", "hop");
|
||||
| -------------------- in this macro invocation
|
||||
|
|
@ -180,6 +190,11 @@ LL | three!("hip", "hop");
|
|||
= note: similarly named tuple variant `Ok` defined here
|
||||
|
|
||||
= note: this error originates in the macro `parent_source_spans` which comes from the expansion of the macro `three` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: a tuple variant with a similar name exists
|
||||
|
|
||||
LL - parent_source_spans!($($tokens)*);
|
||||
LL + Ok;
|
||||
|
|
||||
|
||||
error: aborting due to 21 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,18 @@ error: cannot find macro `bang_proc_macrp` in this scope
|
|||
--> $DIR/resolve-error.rs:60:5
|
||||
|
|
||||
LL | bang_proc_macrp!();
|
||||
| ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `bang_proc_macro`
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/test-macros.rs:10:1
|
||||
|
|
||||
LL | pub fn empty(_: TokenStream) -> TokenStream {
|
||||
| ------------------------------------------- similarly named macro `bang_proc_macro` defined here
|
||||
|
|
||||
help: a macro with a similar name exists
|
||||
|
|
||||
LL - bang_proc_macrp!();
|
||||
LL + bang_proc_macro!();
|
||||
|
|
||||
|
||||
error: cannot find macro `Dlona` in this scope
|
||||
--> $DIR/resolve-error.rs:57:5
|
||||
|
|
@ -22,7 +28,13 @@ LL | macro_rules! attr_proc_mac {
|
|||
| -------------------------- similarly named macro `attr_proc_mac` defined here
|
||||
...
|
||||
LL | attr_proc_macra!();
|
||||
| ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `attr_proc_mac`
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: a macro with a similar name exists
|
||||
|
|
||||
LL - attr_proc_macra!();
|
||||
LL + attr_proc_mac!();
|
||||
|
|
||||
|
||||
error: cannot find macro `FooWithLongNama` in this scope
|
||||
--> $DIR/resolve-error.rs:51:5
|
||||
|
|
@ -31,7 +43,13 @@ LL | macro_rules! FooWithLongNam {
|
|||
| --------------------------- similarly named macro `FooWithLongNam` defined here
|
||||
...
|
||||
LL | FooWithLongNama!();
|
||||
| ^^^^^^^^^^^^^^^ help: a macro with a similar name exists: `FooWithLongNam`
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: a macro with a similar name exists
|
||||
|
|
||||
LL - FooWithLongNama!();
|
||||
LL + FooWithLongNam!();
|
||||
|
|
||||
|
||||
error: cannot find derive macro `attr_proc_macra` in this scope
|
||||
--> $DIR/resolve-error.rs:45:10
|
||||
|
|
@ -51,18 +69,24 @@ error: cannot find derive macro `Dlona` in this scope
|
|||
--> $DIR/resolve-error.rs:40:10
|
||||
|
|
||||
LL | #[derive(Dlona)]
|
||||
| ^^^^^ help: a derive macro with a similar name exists: `Clona`
|
||||
| ^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/derive-clona.rs:6:1
|
||||
|
|
||||
LL | pub fn derive_clonea(input: TokenStream) -> TokenStream {
|
||||
| ------------------------------------------------------- similarly named derive macro `Clona` defined here
|
||||
|
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(Dlona)]
|
||||
LL + #[derive(Clona)]
|
||||
|
|
||||
|
||||
error: cannot find derive macro `Dlona` in this scope
|
||||
--> $DIR/resolve-error.rs:40:10
|
||||
|
|
||||
LL | #[derive(Dlona)]
|
||||
| ^^^^^ help: a derive macro with a similar name exists: `Clona`
|
||||
| ^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/derive-clona.rs:6:1
|
||||
|
|
||||
|
|
@ -70,28 +94,43 @@ LL | pub fn derive_clonea(input: TokenStream) -> TokenStream {
|
|||
| ------------------------------------------------------- similarly named derive macro `Clona` defined here
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(Dlona)]
|
||||
LL + #[derive(Clona)]
|
||||
|
|
||||
|
||||
error: cannot find derive macro `Dlone` in this scope
|
||||
--> $DIR/resolve-error.rs:35:10
|
||||
|
|
||||
LL | #[derive(Dlone)]
|
||||
| ^^^^^ help: a derive macro with a similar name exists: `Clone`
|
||||
| ^^^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/clone.rs:LL:COL
|
||||
|
|
||||
= note: similarly named derive macro `Clone` defined here
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(Dlone)]
|
||||
LL + #[derive(Clone)]
|
||||
|
|
||||
|
||||
error: cannot find derive macro `Dlone` in this scope
|
||||
--> $DIR/resolve-error.rs:35:10
|
||||
|
|
||||
LL | #[derive(Dlone)]
|
||||
| ^^^^^ help: a derive macro with a similar name exists: `Clone`
|
||||
| ^^^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/clone.rs:LL:COL
|
||||
|
|
||||
= note: similarly named derive macro `Clone` defined here
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(Dlone)]
|
||||
LL + #[derive(Clone)]
|
||||
|
|
||||
|
||||
error: cannot find attribute `FooWithLongNan` in this scope
|
||||
--> $DIR/resolve-error.rs:32:3
|
||||
|
|
@ -103,29 +142,41 @@ error: cannot find attribute `attr_proc_macra` in this scope
|
|||
--> $DIR/resolve-error.rs:28:3
|
||||
|
|
||||
LL | #[attr_proc_macra]
|
||||
| ^^^^^^^^^^^^^^^ help: an attribute macro with a similar name exists: `attr_proc_macro`
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/test-macros.rs:15:1
|
||||
|
|
||||
LL | pub fn empty_attr(_: TokenStream, _: TokenStream) -> TokenStream {
|
||||
| ---------------------------------------------------------------- similarly named attribute macro `attr_proc_macro` defined here
|
||||
|
|
||||
help: an attribute macro with a similar name exists
|
||||
|
|
||||
LL - #[attr_proc_macra]
|
||||
LL + #[attr_proc_macro]
|
||||
|
|
||||
|
||||
error: cannot find derive macro `FooWithLongNan` in this scope
|
||||
--> $DIR/resolve-error.rs:22:10
|
||||
|
|
||||
LL | #[derive(FooWithLongNan)]
|
||||
| ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName`
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/derive-foo.rs:6:1
|
||||
|
|
||||
LL | pub fn derive_foo(input: TokenStream) -> TokenStream {
|
||||
| ---------------------------------------------------- similarly named derive macro `FooWithLongName` defined here
|
||||
|
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(FooWithLongNan)]
|
||||
LL + #[derive(FooWithLongName)]
|
||||
|
|
||||
|
||||
error: cannot find derive macro `FooWithLongNan` in this scope
|
||||
--> $DIR/resolve-error.rs:22:10
|
||||
|
|
||||
LL | #[derive(FooWithLongNan)]
|
||||
| ^^^^^^^^^^^^^^ help: a derive macro with a similar name exists: `FooWithLongName`
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/derive-foo.rs:6:1
|
||||
|
|
||||
|
|
@ -133,6 +184,11 @@ LL | pub fn derive_foo(input: TokenStream) -> TokenStream {
|
|||
| ---------------------------------------------------- similarly named derive macro `FooWithLongName` defined here
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
help: a derive macro with a similar name exists
|
||||
|
|
||||
LL - #[derive(FooWithLongNan)]
|
||||
LL + #[derive(FooWithLongName)]
|
||||
|
|
||||
|
||||
error: aborting due to 14 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ LL | impl<H: HandlerFamily> HandlerWrapper<H> {
|
|||
| - similarly named type parameter `H` defined here
|
||||
...
|
||||
LL | T: Send + Sync + 'static,
|
||||
| ^ help: a type parameter with a similar name exists: `H`
|
||||
| ^
|
||||
|
|
||||
help: a type parameter with a similar name exists
|
||||
|
|
||||
LL - T: Send + Sync + 'static,
|
||||
LL + H: Send + Sync + 'static,
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -63,12 +63,14 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `vec
|
|||
--> $DIR/112590-2.rs:24:24
|
||||
|
|
||||
LL | let _t: Vec<i32> = vec::new();
|
||||
| ^^^
|
||||
| |
|
||||
| use of unresolved module or unlinked crate `vec`
|
||||
| help: a struct with a similar name exists (notice the capitalization): `Vec`
|
||||
| ^^^ use of unresolved module or unlinked crate `vec`
|
||||
|
|
||||
= help: you might be missing a crate named `vec`
|
||||
help: a struct with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - let _t: Vec<i32> = vec::new();
|
||||
LL + let _t: Vec<i32> = Vec::new();
|
||||
|
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,14 @@ LL | struct Foo(bool);
|
|||
| ----------------- similarly named tuple struct `Foo` defined here
|
||||
...
|
||||
LL | foo(x)
|
||||
| ^^^ help: a tuple struct with a similar name exists (notice the capitalization): `Foo`
|
||||
| ^^^
|
||||
|
|
||||
= note: function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>
|
||||
help: a tuple struct with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - foo(x)
|
||||
LL + Foo(x)
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ error: cannot find attribute `marco_use` in this scope
|
|||
--> $DIR/issue-49074.rs:3:3
|
||||
|
|
||||
LL | #[marco_use] // typo
|
||||
| ^^^^^^^^^ help: a built-in attribute with a similar name exists: `macro_use`
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: a built-in attribute with a similar name exists
|
||||
|
|
||||
LL - #[marco_use] // typo
|
||||
LL + #[macro_use] // typo
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@ error[E0425]: cannot find type `esize` in this scope
|
|||
--> $DIR/levenshtein.rs:5:11
|
||||
|
|
||||
LL | fn foo(c: esize) {} // Misspelled primitive type name.
|
||||
| ^^^^^ help: a builtin type with a similar name exists: `isize`
|
||||
| ^^^^^
|
||||
|
|
||||
help: a builtin type with a similar name exists
|
||||
|
|
||||
LL - fn foo(c: esize) {} // Misspelled primitive type name.
|
||||
LL + fn foo(c: isize) {} // Misspelled primitive type name.
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `Baz` in this scope
|
||||
--> $DIR/levenshtein.rs:10:10
|
||||
|
|
@ -11,17 +17,28 @@ LL | enum Bar { }
|
|||
| -------- similarly named enum `Bar` defined here
|
||||
LL |
|
||||
LL | type A = Baz; // Misspelled type name.
|
||||
| ^^^ help: an enum with a similar name exists: `Bar`
|
||||
| ^^^
|
||||
|
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - type A = Baz; // Misspelled type name.
|
||||
LL + type A = Bar; // Misspelled type name.
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `Opiton` in this scope
|
||||
--> $DIR/levenshtein.rs:12:10
|
||||
|
|
||||
LL | type B = Opiton<u8>; // Misspelled type name from the prelude.
|
||||
| ^^^^^^ help: an enum with a similar name exists: `Option`
|
||||
| ^^^^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/option.rs:LL:COL
|
||||
|
|
||||
= note: similarly named enum `Option` defined here
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - type B = Opiton<u8>; // Misspelled type name from the prelude.
|
||||
LL + type B = Option<u8>; // Misspelled type name from the prelude.
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `Baz` in this scope
|
||||
--> $DIR/levenshtein.rs:16:14
|
||||
|
|
@ -36,7 +53,12 @@ LL | const MAX_ITEM: usize = 10;
|
|||
| --------------------------- similarly named constant `MAX_ITEM` defined here
|
||||
...
|
||||
LL | let v = [0u32; MAXITEM]; // Misspelled constant name.
|
||||
| ^^^^^^^ help: a constant with a similar name exists: `MAX_ITEM`
|
||||
| ^^^^^^^
|
||||
|
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL | let v = [0u32; MAX_ITEM]; // Misspelled constant name.
|
||||
| +
|
||||
|
||||
error[E0425]: cannot find type `first` in module `m`
|
||||
--> $DIR/levenshtein.rs:28:15
|
||||
|
|
@ -45,7 +67,13 @@ LL | pub struct First;
|
|||
| ----------------- similarly named struct `First` defined here
|
||||
...
|
||||
LL | let b: m::first = m::second; // Misspelled item in module.
|
||||
| ^^^^^ help: a struct with a similar name exists (notice the capitalization): `First`
|
||||
| ^^^^^
|
||||
|
|
||||
help: a struct with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - let b: m::first = m::second; // Misspelled item in module.
|
||||
LL + let b: m::First = m::second; // Misspelled item in module.
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `second` in module `m`
|
||||
--> $DIR/levenshtein.rs:28:26
|
||||
|
|
@ -54,7 +82,13 @@ LL | pub struct Second;
|
|||
| ------------------ similarly named unit struct `Second` defined here
|
||||
...
|
||||
LL | let b: m::first = m::second; // Misspelled item in module.
|
||||
| ^^^^^^ help: a unit struct with a similar name exists (notice the capitalization): `Second`
|
||||
| ^^^^^^
|
||||
|
|
||||
help: a unit struct with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - let b: m::first = m::second; // Misspelled item in module.
|
||||
LL + let b: m::first = m::Second; // Misspelled item in module.
|
||||
|
|
||||
|
||||
error[E0425]: cannot find function `foobar` in this scope
|
||||
--> $DIR/levenshtein.rs:26:5
|
||||
|
|
@ -63,7 +97,12 @@ LL | fn foo_bar() {}
|
|||
| ------------ similarly named function `foo_bar` defined here
|
||||
...
|
||||
LL | foobar(); // Misspelled function name.
|
||||
| ^^^^^^ help: a function with a similar name exists: `foo_bar`
|
||||
| ^^^^^^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL | foo_bar(); // Misspelled function name.
|
||||
| +
|
||||
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -149,13 +149,18 @@ LL | pub enum E {
|
|||
| ---------- similarly named enum `E` defined here
|
||||
...
|
||||
LL | let _: Z = m::n::Z;
|
||||
| ^ help: an enum with a similar name exists: `E`
|
||||
| ^
|
||||
|
|
||||
note: enum `m::Z` exists but is inaccessible
|
||||
--> $DIR/privacy-enum-ctor.rs:12:9
|
||||
|
|
||||
LL | pub(in crate::m) enum Z {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ not accessible
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - let _: Z = m::n::Z;
|
||||
LL + let _: E = m::n::Z;
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found enum `m::n::Z`
|
||||
--> $DIR/privacy-enum-ctor.rs:58:16
|
||||
|
|
@ -192,13 +197,18 @@ LL | pub enum E {
|
|||
| ---------- similarly named enum `E` defined here
|
||||
...
|
||||
LL | let _: Z = m::n::Z::Fn;
|
||||
| ^ help: an enum with a similar name exists: `E`
|
||||
| ^
|
||||
|
|
||||
note: enum `m::Z` exists but is inaccessible
|
||||
--> $DIR/privacy-enum-ctor.rs:12:9
|
||||
|
|
||||
LL | pub(in crate::m) enum Z {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ not accessible
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - let _: Z = m::n::Z::Fn;
|
||||
LL + let _: E = m::n::Z::Fn;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `Z` in this scope
|
||||
--> $DIR/privacy-enum-ctor.rs:65:12
|
||||
|
|
@ -207,13 +217,18 @@ LL | pub enum E {
|
|||
| ---------- similarly named enum `E` defined here
|
||||
...
|
||||
LL | let _: Z = m::n::Z::Struct;
|
||||
| ^ help: an enum with a similar name exists: `E`
|
||||
| ^
|
||||
|
|
||||
note: enum `m::Z` exists but is inaccessible
|
||||
--> $DIR/privacy-enum-ctor.rs:12:9
|
||||
|
|
||||
LL | pub(in crate::m) enum Z {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ not accessible
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - let _: Z = m::n::Z::Struct;
|
||||
LL + let _: E = m::n::Z::Struct;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find type `Z` in this scope
|
||||
--> $DIR/privacy-enum-ctor.rs:69:12
|
||||
|
|
@ -222,13 +237,18 @@ LL | pub enum E {
|
|||
| ---------- similarly named enum `E` defined here
|
||||
...
|
||||
LL | let _: Z = m::n::Z::Unit {};
|
||||
| ^ help: an enum with a similar name exists: `E`
|
||||
| ^
|
||||
|
|
||||
note: enum `m::Z` exists but is inaccessible
|
||||
--> $DIR/privacy-enum-ctor.rs:12:9
|
||||
|
|
||||
LL | pub(in crate::m) enum Z {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ not accessible
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - let _: Z = m::n::Z::Unit {};
|
||||
LL + let _: E = m::n::Z::Unit {};
|
||||
|
|
||||
|
||||
error[E0603]: enum `Z` is private
|
||||
--> $DIR/privacy-enum-ctor.rs:58:22
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@ LL | pub struct S(u8);
|
|||
| ----------------- similarly named tuple struct `S` defined here
|
||||
...
|
||||
LL | Z;
|
||||
| ^
|
||||
| |
|
||||
| constructor is not visible here due to private fields
|
||||
| help: a tuple struct with a similar name exists: `S`
|
||||
| ^ constructor is not visible here due to private fields
|
||||
|
|
||||
help: a tuple struct with a similar name exists
|
||||
|
|
||||
LL - Z;
|
||||
LL + S;
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found struct `S`
|
||||
--> $DIR/privacy-struct-ctor.rs:34:5
|
||||
|
|
|
|||
|
|
@ -73,9 +73,13 @@ LL | pub const I: i32 = 1;
|
|||
| --------------------- similarly named constant `I` defined here
|
||||
...
|
||||
LL | v.push(a::b);
|
||||
| ^^^-
|
||||
| |
|
||||
| help: a constant with a similar name exists: `I`
|
||||
| ^^^^
|
||||
|
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL - v.push(a::b);
|
||||
LL + v.push(a::I);
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found module `a::b`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:52:5
|
||||
|
|
@ -104,9 +108,13 @@ LL | pub const I: i32 = 1;
|
|||
| --------------------- similarly named constant `I` defined here
|
||||
...
|
||||
LL | a::b
|
||||
| ^^^-
|
||||
| |
|
||||
| help: a constant with a similar name exists: `I`
|
||||
| ^^^^
|
||||
|
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL - a::b
|
||||
LL + a::I
|
||||
|
|
||||
|
||||
error[E0423]: expected function, found module `a::b`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:65:5
|
||||
|
|
@ -115,9 +123,13 @@ LL | pub const I: i32 = 1;
|
|||
| --------------------- similarly named constant `I` defined here
|
||||
...
|
||||
LL | a::b()
|
||||
| ^^^-
|
||||
| |
|
||||
| help: a constant with a similar name exists: `I`
|
||||
| ^^^^
|
||||
|
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL - a::b()
|
||||
LL + a::I()
|
||||
|
|
||||
|
||||
error[E0423]: expected value, found module `a`
|
||||
--> $DIR/suggest-path-instead-of-mod-dot-item.rs:72:9
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ LL | struct S(u8, u16);
|
|||
| ------------------ similarly named tuple struct `S` defined here
|
||||
...
|
||||
LL | A(..) => {}
|
||||
| ^ help: a tuple struct with a similar name exists: `S`
|
||||
| ^
|
||||
|
|
||||
help: a tuple struct with a similar name exists
|
||||
|
|
||||
LL - A(..) => {}
|
||||
LL + S(..) => {}
|
||||
|
|
||||
|
||||
error[E0423]: expected function, tuple struct or tuple variant, found type alias `A`
|
||||
--> $DIR/tuple-struct-alias.rs:5:13
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ LL | config: String,
|
|||
| ------ a field by that name exists in `Self`
|
||||
...
|
||||
LL | Self { config }
|
||||
| ^^^^^^ help: a local variable with a similar name exists: `cofig`
|
||||
| ^^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - Self { config }
|
||||
LL + Self { cofig }
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `config` in this scope
|
||||
--> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:11:20
|
||||
|
|
@ -14,15 +20,26 @@ LL | config: String,
|
|||
| ------ a field by that name exists in `Self`
|
||||
...
|
||||
LL | println!("{config}");
|
||||
| ^^^^^^ help: a local variable with a similar name exists: `cofig`
|
||||
| ^^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{config}");
|
||||
LL + println!("{cofig}");
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `config` in this scope
|
||||
--> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:15:20
|
||||
|
|
||||
LL | println!("{config}");
|
||||
| ^^^^^^ help: a local variable with a similar name exists: `cofig`
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: you might have meant to use the available field in a format string: `"{}", self.config`
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{config}");
|
||||
LL + println!("{cofig}");
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `bah` in this scope
|
||||
--> $DIR/typo-suggestion-for-variable-with-name-similar-to-struct-field.rs:33:9
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@ error[E0433]: failed to resolve: could not find `Struc` in `module`
|
|||
--> $DIR/typo-suggestion-mistyped-in-path.rs:35:13
|
||||
|
|
||||
LL | module::Struc::foo();
|
||||
| ^^^^^
|
||||
| |
|
||||
| could not find `Struc` in `module`
|
||||
| help: a struct with a similar name exists: `Struct`
|
||||
| ^^^^^ could not find `Struc` in `module`
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL | module::Struct::foo();
|
||||
| +
|
||||
|
||||
error[E0599]: no function or associated item named `fob` found for struct `Struct` in the current scope
|
||||
--> $DIR/typo-suggestion-mistyped-in-path.rs:23:13
|
||||
|
|
@ -26,10 +28,12 @@ error[E0433]: failed to resolve: use of undeclared type `Struc`
|
|||
--> $DIR/typo-suggestion-mistyped-in-path.rs:27:5
|
||||
|
|
||||
LL | Struc::foo();
|
||||
| ^^^^^
|
||||
| |
|
||||
| use of undeclared type `Struc`
|
||||
| help: a struct with a similar name exists: `Struct`
|
||||
| ^^^^^ use of undeclared type `Struc`
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL | Struct::foo();
|
||||
| +
|
||||
|
||||
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `modul`
|
||||
--> $DIR/typo-suggestion-mistyped-in-path.rs:31:5
|
||||
|
|
@ -46,10 +50,12 @@ error[E0433]: failed to resolve: use of undeclared type `Trai`
|
|||
--> $DIR/typo-suggestion-mistyped-in-path.rs:39:5
|
||||
|
|
||||
LL | Trai::foo();
|
||||
| ^^^^
|
||||
| |
|
||||
| use of undeclared type `Trai`
|
||||
| help: a trait with a similar name exists: `Trait`
|
||||
| ^^^^ use of undeclared type `Trai`
|
||||
|
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | Trait::foo();
|
||||
| +
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@ error[E0425]: cannot find value `fina` in this scope
|
|||
--> $DIR/suggestion-raw-68962.rs:7:5
|
||||
|
|
||||
LL | fina;
|
||||
| ^^^^ help: a local variable with a similar name exists: `r#final`
|
||||
| ^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - fina;
|
||||
LL + r#final;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find function `f` in this scope
|
||||
--> $DIR/suggestion-raw-68962.rs:10:5
|
||||
|
|
@ -11,7 +17,13 @@ LL | fn r#fn() {}
|
|||
| --------- similarly named function `r#fn` defined here
|
||||
...
|
||||
LL | f();
|
||||
| ^ help: a function with a similar name exists: `r#fn`
|
||||
| ^
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - f();
|
||||
LL + r#fn();
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@ error[E0425]: cannot find value `fob` in this scope
|
|||
--> $DIR/typo-suggestion.rs:8:26
|
||||
|
|
||||
LL | println!("Hello {}", fob);
|
||||
| ^^^ help: a local variable with a similar name exists: `foo`
|
||||
| ^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("Hello {}", fob);
|
||||
LL + println!("Hello {}", foo);
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,18 @@ error[E0425]: cannot find function `foo1` in crate `similar_unstable_method`
|
|||
--> $DIR/issue-109177.rs:7:30
|
||||
|
|
||||
LL | similar_unstable_method::foo1();
|
||||
| ^^^^ help: a function with a similar name exists: `foo`
|
||||
| ^^^^
|
||||
|
|
||||
::: $DIR/auxiliary/similar-unstable-method.rs:5:1
|
||||
|
|
||||
LL | pub fn foo() {}
|
||||
| ------------ similarly named function `foo` defined here
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - similar_unstable_method::foo1();
|
||||
LL + similar_unstable_method::foo();
|
||||
|
|
||||
|
||||
error[E0599]: no method named `foo1` found for struct `Foo` in the current scope
|
||||
--> $DIR/issue-109177.rs:11:9
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@ error[E0425]: cannot find value `y` in this scope
|
|||
--> $DIR/struct-fields-shorthand-unresolved.rs:10:9
|
||||
|
|
||||
LL | y
|
||||
| ^ help: a local variable with a similar name exists: `x`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - y
|
||||
LL + x
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -8,23 +8,38 @@ error: cannot find attribute `rustc_dumm` in this scope
|
|||
--> $DIR/attribute-typos.rs:7:3
|
||||
|
|
||||
LL | #[rustc_dumm]
|
||||
| ^^^^^^^^^^ help: a built-in attribute with a similar name exists: `rustc_dummy`
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: a built-in attribute with a similar name exists
|
||||
|
|
||||
LL | #[rustc_dummy]
|
||||
| +
|
||||
|
||||
error: cannot find attribute `tests` in this scope
|
||||
--> $DIR/attribute-typos.rs:4:3
|
||||
|
|
||||
LL | #[tests]
|
||||
| ^^^^^ help: an attribute macro with a similar name exists: `test`
|
||||
| ^^^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
|
|
||||
= note: similarly named attribute macro `test` defined here
|
||||
help: an attribute macro with a similar name exists
|
||||
|
|
||||
LL - #[tests]
|
||||
LL + #[test]
|
||||
|
|
||||
|
||||
error: cannot find attribute `deprcated` in this scope
|
||||
--> $DIR/attribute-typos.rs:1:3
|
||||
|
|
||||
LL | #[deprcated]
|
||||
| ^^^^^^^^^ help: a built-in attribute with a similar name exists: `deprecated`
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: a built-in attribute with a similar name exists
|
||||
|
|
||||
LL | #[deprecated]
|
||||
| +
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,97 +2,193 @@ error[E0425]: cannot find value `Hello` in this scope
|
|||
--> $DIR/case-difference-suggestions.rs:5:20
|
||||
|
|
||||
LL | println!("{}", Hello);
|
||||
| ^^^^^ help: a local variable with a similar name exists: `hello`
|
||||
| ^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{}", Hello);
|
||||
LL + println!("{}", hello);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `myvariable` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:9:20
|
||||
|
|
||||
LL | println!("{}", myvariable);
|
||||
| ^^^^^^^^^^ help: a local variable with a similar name exists (notice the capitalization): `myVariable`
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - println!("{}", myvariable);
|
||||
LL + println!("{}", myVariable);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `User_Name` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:13:20
|
||||
|
|
||||
LL | println!("{}", User_Name);
|
||||
| ^^^^^^^^^ help: a local variable with a similar name exists: `user_name`
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{}", User_Name);
|
||||
LL + println!("{}", user_name);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `foo` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:17:20
|
||||
|
|
||||
LL | println!("{}", foo);
|
||||
| ^^^ help: a local variable with a similar name exists (notice the capitalization): `FOO`
|
||||
| ^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the capitalization)
|
||||
|
|
||||
LL - println!("{}", foo);
|
||||
LL + println!("{}", FOO);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `FFOO` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:22:20
|
||||
|
|
||||
LL | println!("{}", FFOO);
|
||||
| ^^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `FFO0`
|
||||
| ^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", FFOO);
|
||||
LL + println!("{}", FFO0);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `list` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:25:20
|
||||
|
|
||||
LL | println!("{}", list);
|
||||
| ^^^^ help: a local variable with a similar name exists: `l1st`
|
||||
| ^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{}", list);
|
||||
LL + println!("{}", l1st);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `SS` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:28:20
|
||||
|
|
||||
LL | println!("{}", SS);
|
||||
| ^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `S5`
|
||||
| ^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", SS);
|
||||
LL + println!("{}", S5);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `a55` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:31:20
|
||||
|
|
||||
LL | println!("{}", a55);
|
||||
| ^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `aS5`
|
||||
| ^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", a55);
|
||||
LL + println!("{}", aS5);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `BB` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:34:20
|
||||
|
|
||||
LL | println!("{}", BB);
|
||||
| ^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `B8`
|
||||
| ^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", BB);
|
||||
LL + println!("{}", B8);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `gg` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:37:20
|
||||
|
|
||||
LL | println!("{}", gg);
|
||||
| ^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `g9`
|
||||
| ^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", gg);
|
||||
LL + println!("{}", g9);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `old` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:40:20
|
||||
|
|
||||
LL | println!("{}", old);
|
||||
| ^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `o1d`
|
||||
| ^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", old);
|
||||
LL + println!("{}", o1d);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `newl` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:43:20
|
||||
|
|
||||
LL | println!("{}", newl);
|
||||
| ^^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `new1`
|
||||
| ^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", newl);
|
||||
LL + println!("{}", new1);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `app1e` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:46:20
|
||||
|
|
||||
LL | println!("{}", app1e);
|
||||
| ^^^^^ help: a local variable with a similar name exists (notice the digit/letter confusion): `apple`
|
||||
| ^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", app1e);
|
||||
LL + println!("{}", apple);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `A` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:49:20
|
||||
|
|
||||
LL | println!("{}", A);
|
||||
| ^ help: a local variable with a similar name exists: `a`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{}", A);
|
||||
LL + println!("{}", a);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `world1U` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:52:20
|
||||
|
|
||||
LL | println!("{}", world1U);
|
||||
| ^^^^^^^ help: a local variable with a similar name exists (notice the capitalization and digit/letter confusion): `worldlu`
|
||||
| ^^^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the capitalization and digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", world1U);
|
||||
LL + println!("{}", worldlu);
|
||||
|
|
||||
|
||||
error[E0425]: cannot find value `myv4r1able` in this scope
|
||||
--> $DIR/case-difference-suggestions.rs:55:20
|
||||
|
|
||||
LL | println!("{}", myv4r1able);
|
||||
| ^^^^^^^^^^ help: a local variable with a similar name exists (notice the capitalization and digit/letter confusion): `myV4rlable`
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists (notice the capitalization and digit/letter confusion)
|
||||
|
|
||||
LL - println!("{}", myv4r1able);
|
||||
LL + println!("{}", myV4rlable);
|
||||
|
|
||||
|
||||
error: aborting due to 16 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@ error[E0573]: expected type, found module `result`
|
|||
--> $DIR/do-not-attempt-to-add-suggestions-with-no-changes.rs:3:6
|
||||
|
|
||||
LL | impl result {
|
||||
| ^^^^^^ help: an enum with a similar name exists: `Result`
|
||||
| ^^^^^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/result.rs:LL:COL
|
||||
|
|
||||
= note: similarly named enum `Result` defined here
|
||||
help: an enum with a similar name exists
|
||||
|
|
||||
LL - impl result {
|
||||
LL + impl Result {
|
||||
|
|
||||
|
||||
error[E0573]: expected type, found variant `Err`
|
||||
--> $DIR/do-not-attempt-to-add-suggestions-with-no-changes.rs:4:25
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@ error[E0425]: cannot find value `a_variable_longer_name` in this scope
|
|||
--> $DIR/issue-66968-suggest-sorted-words.rs:3:20
|
||||
|
|
||||
LL | println!("{}", a_variable_longer_name);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `a_longer_variable_name`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - println!("{}", a_variable_longer_name);
|
||||
LL + println!("{}", a_longer_variable_name);
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -84,11 +84,15 @@ error[E0404]: expected trait, found struct `String`
|
|||
--> $DIR/assoc_type_bound_with_struct.rs:19:51
|
||||
|
|
||||
LL | fn issue_95327() where <u8 as Unresolved>::Assoc: String {}
|
||||
| ^^^^^^ help: a trait with a similar name exists: `ToString`
|
||||
| ^^^^^^
|
||||
|
|
||||
--> $SRC_DIR/alloc/src/string.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `ToString` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | fn issue_95327() where <u8 as Unresolved>::Assoc: ToString {}
|
||||
| ++
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -42,10 +42,16 @@ error[E0425]: cannot find function `main8` in this scope
|
|||
--> $DIR/ice-120503-async-const-method.rs:11:9
|
||||
|
|
||||
LL | main8().await;
|
||||
| ^^^^^ help: a function with a similar name exists: `main`
|
||||
| ^^^^^
|
||||
...
|
||||
LL | fn main() {}
|
||||
| --------- similarly named function `main` defined here
|
||||
|
|
||||
help: a function with a similar name exists
|
||||
|
|
||||
LL - main8().await;
|
||||
LL + main().await;
|
||||
|
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ LL | pub fn add<const U: Dimension>(x: Quantity<f32, U>) -> Quantity<f32, U> {
|
|||
| - similarly named const parameter `U` defined here
|
||||
LL |
|
||||
LL | x + y
|
||||
| ^ help: a const parameter with a similar name exists: `U`
|
||||
| ^
|
||||
|
|
||||
help: a const parameter with a similar name exists
|
||||
|
|
||||
LL - x + y
|
||||
LL + x + U
|
||||
|
|
||||
|
||||
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/mismatched_generic_args.rs:1:12
|
||||
|
|
|
|||
|
|
@ -5,7 +5,13 @@ LL | trait A {
|
|||
| ------- similarly named trait `A` defined here
|
||||
...
|
||||
LL | impl A for a {
|
||||
| ^ help: a trait with a similar name exists: `A`
|
||||
| ^
|
||||
|
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL - impl A for a {
|
||||
LL + impl A for A {
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,16 @@ error[E0425]: cannot find function `value` in this scope
|
|||
--> $DIR/type-error-drop-elaboration.rs:12:5
|
||||
|
|
||||
LL | value()
|
||||
| ^^^^^ help: a constant with a similar name exists: `VALUE`
|
||||
| ^^^^^
|
||||
...
|
||||
LL | const VALUE: Foo = foo();
|
||||
| ------------------------- similarly named constant `VALUE` defined here
|
||||
|
|
||||
help: a constant with a similar name exists
|
||||
|
|
||||
LL - value()
|
||||
LL + VALUE()
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@ error[E0425]: cannot find type `Fo` in this scope
|
|||
--> $DIR/issue-7607-1.rs:5:6
|
||||
|
|
||||
LL | impl Fo {
|
||||
| ^^ help: a trait with a similar name exists: `Fn`
|
||||
| ^^
|
||||
|
|
||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Fn` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL - impl Fo {
|
||||
LL + impl Fn {
|
||||
|
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ error[E0425]: cannot find value `g` in this scope
|
|||
--> $DIR/issue-114423-ice-regression-in-suggestion.rs:11:22
|
||||
|
|
||||
LL | let _ = RGB { r, g, b };
|
||||
| ^ help: a local variable with a similar name exists: `b`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - let _ = RGB { r, g, b };
|
||||
LL + let _ = RGB { r, b, b };
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-114423-ice-regression-in-suggestion.rs:7:50
|
||||
|
|
|
|||
|
|
@ -2,23 +2,26 @@ error[E0433]: failed to resolve: use of unresolved module or unlinked crate `n`
|
|||
--> $DIR/issue-120856.rs:1:37
|
||||
|
|
||||
LL | pub type Archived<T> = <m::Alias as n::Trait>::Archived;
|
||||
| ^
|
||||
| |
|
||||
| use of unresolved module or unlinked crate `n`
|
||||
| help: a trait with a similar name exists: `Fn`
|
||||
| ^ use of unresolved module or unlinked crate `n`
|
||||
|
|
||||
= help: you might be missing a crate named `n`
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | pub type Archived<T> = <m::Alias as Fn::Trait>::Archived;
|
||||
| +
|
||||
|
||||
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `m`
|
||||
--> $DIR/issue-120856.rs:1:25
|
||||
|
|
||||
LL | pub type Archived<T> = <m::Alias as n::Trait>::Archived;
|
||||
| ^
|
||||
| |
|
||||
| use of unresolved module or unlinked crate `m`
|
||||
| help: a type parameter with a similar name exists: `T`
|
||||
| ^ use of unresolved module or unlinked crate `m`
|
||||
|
|
||||
= help: you might be missing a crate named `m`
|
||||
help: a type parameter with a similar name exists
|
||||
|
|
||||
LL - pub type Archived<T> = <m::Alias as n::Trait>::Archived;
|
||||
LL + pub type Archived<T> = <T::Alias as n::Trait>::Archived;
|
||||
|
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@ error[E0425]: cannot find type `F` in this scope
|
|||
--> $DIR/issue-83693.rs:6:6
|
||||
|
|
||||
LL | impl F {
|
||||
| ^ help: a trait with a similar name exists: `Fn`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Fn` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | impl Fn {
|
||||
| +
|
||||
|
||||
error[E0425]: cannot find type `TestResult` in this scope
|
||||
--> $DIR/issue-83693.rs:9:22
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@ LL | struct Struct { value: i32 }
|
|||
| ------------- similarly named struct `Struct` defined here
|
||||
...
|
||||
LL | impl Stuct {
|
||||
| ^^^^^ help: a struct with a similar name exists: `Struct`
|
||||
| ^^^^^
|
||||
|
|
||||
help: a struct with a similar name exists
|
||||
|
|
||||
LL | impl Struct {
|
||||
| +
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -5,17 +5,27 @@ LL | type Y = u16;
|
|||
| ------------- similarly named associated type `Y` defined here
|
||||
...
|
||||
LL | let _: <u8 as Tr>::N;
|
||||
| ^ help: an associated type with a similar name exists: `Y`
|
||||
| ^
|
||||
|
|
||||
help: an associated type with a similar name exists
|
||||
|
|
||||
LL - let _: <u8 as Tr>::N;
|
||||
LL + let _: <u8 as Tr>::Y;
|
||||
|
|
||||
|
||||
error[E0404]: expected trait, found enum `E`
|
||||
--> $DIR/ufcs-partially-resolved.rs:20:19
|
||||
|
|
||||
LL | let _: <u8 as E>::N;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | let _: <u8 as Eq>::N;
|
||||
| +
|
||||
|
||||
error[E0404]: expected trait, found type alias `A`
|
||||
--> $DIR/ufcs-partially-resolved.rs:21:19
|
||||
|
|
@ -36,17 +46,27 @@ LL | fn Y() {}
|
|||
| ------ similarly named associated function `Y` defined here
|
||||
...
|
||||
LL | <u8 as Tr>::N;
|
||||
| ^ help: an associated function with a similar name exists: `Y`
|
||||
| ^
|
||||
|
|
||||
help: an associated function with a similar name exists
|
||||
|
|
||||
LL - <u8 as Tr>::N;
|
||||
LL + <u8 as Tr>::Y;
|
||||
|
|
||||
|
||||
error[E0404]: expected trait, found enum `E`
|
||||
--> $DIR/ufcs-partially-resolved.rs:23:12
|
||||
|
|
||||
LL | <u8 as E>::N;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | <u8 as Eq>::N;
|
||||
| +
|
||||
|
||||
error[E0404]: expected trait, found type alias `A`
|
||||
--> $DIR/ufcs-partially-resolved.rs:24:12
|
||||
|
|
@ -64,21 +84,29 @@ error[E0404]: expected trait, found enum `E`
|
|||
--> $DIR/ufcs-partially-resolved.rs:26:19
|
||||
|
|
||||
LL | let _: <u8 as E>::Y;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | let _: <u8 as Eq>::Y;
|
||||
| +
|
||||
|
||||
error[E0404]: expected trait, found enum `E`
|
||||
--> $DIR/ufcs-partially-resolved.rs:28:12
|
||||
|
|
||||
LL | <u8 as E>::Y;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | <u8 as Eq>::Y;
|
||||
| +
|
||||
|
||||
error[E0576]: cannot find associated type `N` in trait `Tr`
|
||||
--> $DIR/ufcs-partially-resolved.rs:30:24
|
||||
|
|
@ -87,17 +115,27 @@ LL | type Y = u16;
|
|||
| ------------- similarly named associated type `Y` defined here
|
||||
...
|
||||
LL | let _: <u8 as Tr>::N::NN;
|
||||
| ^ help: an associated type with a similar name exists: `Y`
|
||||
| ^
|
||||
|
|
||||
help: an associated type with a similar name exists
|
||||
|
|
||||
LL - let _: <u8 as Tr>::N::NN;
|
||||
LL + let _: <u8 as Tr>::Y::NN;
|
||||
|
|
||||
|
||||
error[E0404]: expected trait, found enum `E`
|
||||
--> $DIR/ufcs-partially-resolved.rs:31:19
|
||||
|
|
||||
LL | let _: <u8 as E>::N::NN;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | let _: <u8 as Eq>::N::NN;
|
||||
| +
|
||||
|
||||
error[E0404]: expected trait, found type alias `A`
|
||||
--> $DIR/ufcs-partially-resolved.rs:32:19
|
||||
|
|
@ -118,17 +156,27 @@ LL | type Y = u16;
|
|||
| ------------- similarly named associated type `Y` defined here
|
||||
...
|
||||
LL | <u8 as Tr>::N::NN;
|
||||
| ^ help: an associated type with a similar name exists: `Y`
|
||||
| ^
|
||||
|
|
||||
help: an associated type with a similar name exists
|
||||
|
|
||||
LL - <u8 as Tr>::N::NN;
|
||||
LL + <u8 as Tr>::Y::NN;
|
||||
|
|
||||
|
||||
error[E0404]: expected trait, found enum `E`
|
||||
--> $DIR/ufcs-partially-resolved.rs:34:12
|
||||
|
|
||||
LL | <u8 as E>::N::NN;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | <u8 as Eq>::N::NN;
|
||||
| +
|
||||
|
||||
error[E0404]: expected trait, found type alias `A`
|
||||
--> $DIR/ufcs-partially-resolved.rs:35:12
|
||||
|
|
@ -146,21 +194,29 @@ error[E0404]: expected trait, found enum `E`
|
|||
--> $DIR/ufcs-partially-resolved.rs:37:19
|
||||
|
|
||||
LL | let _: <u8 as E>::Y::NN;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | let _: <u8 as Eq>::Y::NN;
|
||||
| +
|
||||
|
||||
error[E0404]: expected trait, found enum `E`
|
||||
--> $DIR/ufcs-partially-resolved.rs:39:12
|
||||
|
|
||||
LL | <u8 as E>::Y::NN;
|
||||
| ^ help: a trait with a similar name exists: `Eq`
|
||||
| ^
|
||||
|
|
||||
--> $SRC_DIR/core/src/cmp.rs:LL:COL
|
||||
|
|
||||
= note: similarly named trait `Eq` defined here
|
||||
help: a trait with a similar name exists
|
||||
|
|
||||
LL | <u8 as Eq>::Y::NN;
|
||||
| +
|
||||
|
||||
error[E0405]: cannot find trait `N` in trait `Tr`
|
||||
--> $DIR/ufcs-partially-resolved.rs:41:23
|
||||
|
|
@ -229,9 +285,13 @@ LL | type X = u16;
|
|||
| ------------- similarly named associated type `X` defined here
|
||||
...
|
||||
LL | let _: <u8 as Dr>::Z;
|
||||
| ^^^^^^^^^^^^-
|
||||
| |
|
||||
| help: an associated type with a similar name exists: `X`
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: an associated type with a similar name exists
|
||||
|
|
||||
LL - let _: <u8 as Dr>::Z;
|
||||
LL + let _: <u8 as Dr>::X;
|
||||
|
|
||||
|
||||
error[E0575]: expected method or associated constant, found associated type `Dr::X`
|
||||
--> $DIR/ufcs-partially-resolved.rs:53:5
|
||||
|
|
@ -240,9 +300,13 @@ LL | fn Z() {}
|
|||
| ------ similarly named associated function `Z` defined here
|
||||
...
|
||||
LL | <u8 as Dr>::X;
|
||||
| ^^^^^^^^^^^^-
|
||||
| |
|
||||
| help: an associated function with a similar name exists: `Z`
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
help: an associated function with a similar name exists
|
||||
|
|
||||
LL - <u8 as Dr>::X;
|
||||
LL + <u8 as Dr>::Z;
|
||||
|
|
||||
|
||||
error[E0575]: expected associated type, found associated function `Dr::Z`
|
||||
--> $DIR/ufcs-partially-resolved.rs:54:12
|
||||
|
|
@ -251,9 +315,13 @@ LL | type X = u16;
|
|||
| ------------- similarly named associated type `X` defined here
|
||||
...
|
||||
LL | let _: <u8 as Dr>::Z::N;
|
||||
| ^^^^^^^^^^^^-^^^
|
||||
| |
|
||||
| help: an associated type with a similar name exists: `X`
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
help: an associated type with a similar name exists
|
||||
|
|
||||
LL - let _: <u8 as Dr>::Z::N;
|
||||
LL + let _: <u8 as Dr>::X::N;
|
||||
|
|
||||
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/ufcs-partially-resolved.rs:36:12
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@ error[E0425]: cannot find value `y` in this scope
|
|||
--> $DIR/unboxed-closures-type-mismatch-closure-from-another-scope.rs:9:26
|
||||
|
|
||||
LL | closure(&mut p, &y);
|
||||
| ^ help: a local variable with a similar name exists: `p`
|
||||
| ^
|
||||
|
|
||||
help: a local variable with a similar name exists
|
||||
|
|
||||
LL - closure(&mut p, &y);
|
||||
LL + closure(&mut p, &p);
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/unboxed-closures-type-mismatch-closure-from-another-scope.rs:9:17
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue