Unify wording of resolve error

Remove "failed to resolve" and use the same format we use in other resolution errors "cannot find `name`".

```
error[E0433]: cannot find `nonexistent` in `existent`
  --> $DIR/custom_attr_multisegment_error.rs:5:13
   |
LL | #[existent::nonexistent]
   |             ^^^^^^^^^^^ could not find `nonexistent` in `existent`
```
This commit is contained in:
Esteban Küber 2025-08-12 22:27:45 +00:00
parent 3f6250a7bb
commit c73b3d20c6
249 changed files with 778 additions and 666 deletions

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `Complete`
error[E0433]: cannot find type `Complete` in this scope
--> foo.rs:3:12
|
3 | x.push(Complete::Item { name: "hello" });

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `Complete`
error[E0433]: cannot find type `Complete` in this scope
--> foo.rs:3:12
|
3 | x.push(Complete::Item { name: "hello" });

View file

@ -1,6 +1,6 @@
// Regression test for issue #95879.
use unresolved_crate::module::Name; //~ ERROR failed to resolve
use unresolved_crate::module::Name; //~ ERROR cannot find
/// [Name]
pub struct S;

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved_crate`
error[E0433]: cannot find module or crate `unresolved_crate` in the crate root
--> $DIR/unresolved-import-recovery.rs:3:5
|
LL | use unresolved_crate::module::Name;

View file

@ -1,4 +1,4 @@
// This previously triggered an ICE.
pub(in crate::r#mod) fn main() {}
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `r#mod`
//~^ ERROR cannot find module or crate `r#mod` in `crate`

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `r#mod`
error[E0433]: cannot find module or crate `r#mod` in `crate`
--> $DIR/issue-61732.rs:3:15
|
LL | pub(in crate::r#mod) fn main() {}

View file

@ -137,7 +137,7 @@ struct MessageWrongType {
struct InvalidPathFieldAttr {
#[nonsense]
//~^ ERROR `#[nonsense]` is not a valid attribute
//~^^ ERROR cannot find attribute `nonsense` in this scope
//~| ERROR cannot find attribute `nonsense` in this scope
foo: String,
}

View file

@ -90,6 +90,14 @@ struct G {
var: String,
}
#[derive(Subdiagnostic)]
#[label("...")]
struct H {
#[primary_span]
span: Span,
var: String,
}
#[derive(Subdiagnostic)]
#[label(slug = 4)]
//~^ ERROR no nested attribute expected here

View file

@ -35,109 +35,109 @@ LL | #[label(bug = "...")]
| ^
error: derive(Diagnostic): no nested attribute expected here
--> $DIR/subdiagnostic-derive-inline.rs:94:9
--> $DIR/subdiagnostic-derive-inline.rs:102:9
|
LL | #[label(slug = 4)]
| ^^^^
error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive-inline.rs:94:1
--> $DIR/subdiagnostic-derive-inline.rs:102:1
|
LL | #[label(slug = 4)]
| ^
error: derive(Diagnostic): no nested attribute expected here
--> $DIR/subdiagnostic-derive-inline.rs:104:9
--> $DIR/subdiagnostic-derive-inline.rs:112:9
|
LL | #[label(slug("..."))]
| ^^^^
error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive-inline.rs:104:1
--> $DIR/subdiagnostic-derive-inline.rs:112:1
|
LL | #[label(slug("..."))]
| ^
error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive-inline.rs:114:1
--> $DIR/subdiagnostic-derive-inline.rs:122:1
|
LL | #[label()]
| ^
error: derive(Diagnostic): no nested attribute expected here
--> $DIR/subdiagnostic-derive-inline.rs:123:28
--> $DIR/subdiagnostic-derive-inline.rs:131:28
|
LL | #[label("example message", code = "...")]
| ^^^^
error: derive(Diagnostic): no nested attribute expected here
--> $DIR/subdiagnostic-derive-inline.rs:132:28
--> $DIR/subdiagnostic-derive-inline.rs:140:28
|
LL | #[label("example message", applicability = "machine-applicable")]
| ^^^^^^^^^^^^^
error: derive(Diagnostic): unsupported type attribute for subdiagnostic enum
--> $DIR/subdiagnostic-derive-inline.rs:141:1
--> $DIR/subdiagnostic-derive-inline.rs:149:1
|
LL | #[foo]
| ^
error: derive(Diagnostic): `#[bar]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:155:5
--> $DIR/subdiagnostic-derive-inline.rs:163:5
|
LL | #[bar]
| ^
error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:167:5
--> $DIR/subdiagnostic-derive-inline.rs:175:5
|
LL | #[bar = "..."]
| ^
error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:179:5
--> $DIR/subdiagnostic-derive-inline.rs:187:5
|
LL | #[bar = 4]
| ^
error: derive(Diagnostic): `#[bar(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:191:5
--> $DIR/subdiagnostic-derive-inline.rs:199:5
|
LL | #[bar("...")]
| ^
error: derive(Diagnostic): no nested attribute expected here
--> $DIR/subdiagnostic-derive-inline.rs:203:13
--> $DIR/subdiagnostic-derive-inline.rs:211:13
|
LL | #[label(code = "...")]
| ^^^^
error: derive(Diagnostic): diagnostic message must be first argument of a `#[label(...)]` attribute
--> $DIR/subdiagnostic-derive-inline.rs:203:5
--> $DIR/subdiagnostic-derive-inline.rs:211:5
|
LL | #[label(code = "...")]
| ^
error: derive(Diagnostic): the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/subdiagnostic-derive-inline.rs:232:5
--> $DIR/subdiagnostic-derive-inline.rs:240:5
|
LL | #[primary_span]
| ^
error: derive(Diagnostic): label without `#[primary_span]` field
--> $DIR/subdiagnostic-derive-inline.rs:229:1
--> $DIR/subdiagnostic-derive-inline.rs:237:1
|
LL | #[label("example message")]
| ^
error: derive(Diagnostic): `#[applicability]` is only valid on suggestions
--> $DIR/subdiagnostic-derive-inline.rs:242:5
--> $DIR/subdiagnostic-derive-inline.rs:250:5
|
LL | #[applicability]
| ^
error: derive(Diagnostic): `#[bar]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:252:5
--> $DIR/subdiagnostic-derive-inline.rs:260:5
|
LL | #[bar]
| ^
@ -145,13 +145,13 @@ LL | #[bar]
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: derive(Diagnostic): `#[bar = ...]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:263:5
--> $DIR/subdiagnostic-derive-inline.rs:271:5
|
LL | #[bar = "..."]
| ^
error: derive(Diagnostic): `#[bar(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:274:5
--> $DIR/subdiagnostic-derive-inline.rs:282:5
|
LL | #[bar("...")]
| ^
@ -159,7 +159,7 @@ LL | #[bar("...")]
= help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
error: unexpected unsupported untagged union
--> $DIR/subdiagnostic-derive-inline.rs:290:1
--> $DIR/subdiagnostic-derive-inline.rs:298:1
|
LL | / union AC {
LL | |
@ -169,97 +169,97 @@ LL | | }
| |_^
error: expected this path to be an identifier
--> $DIR/subdiagnostic-derive-inline.rs:305:28
--> $DIR/subdiagnostic-derive-inline.rs:313:28
|
LL | #[label("example message", no_crate::example)]
| ^^^^^^^^^^^^^^^^^
error: derive(Diagnostic): attribute specified multiple times
--> $DIR/subdiagnostic-derive-inline.rs:318:5
--> $DIR/subdiagnostic-derive-inline.rs:326:5
|
LL | #[primary_span]
| ^
|
note: previously specified here
--> $DIR/subdiagnostic-derive-inline.rs:315:5
--> $DIR/subdiagnostic-derive-inline.rs:323:5
|
LL | #[primary_span]
| ^
error: derive(Diagnostic): subdiagnostic kind not specified
--> $DIR/subdiagnostic-derive-inline.rs:324:8
--> $DIR/subdiagnostic-derive-inline.rs:332:8
|
LL | struct AG {
| ^^
error: derive(Diagnostic): attribute specified multiple times
--> $DIR/subdiagnostic-derive-inline.rs:361:47
--> $DIR/subdiagnostic-derive-inline.rs:369:47
|
LL | #[suggestion("example message", code = "...", code = "...")]
| ^^^^
|
note: previously specified here
--> $DIR/subdiagnostic-derive-inline.rs:361:33
--> $DIR/subdiagnostic-derive-inline.rs:369:33
|
LL | #[suggestion("example message", code = "...", code = "...")]
| ^^^^
error: derive(Diagnostic): attribute specified multiple times
--> $DIR/subdiagnostic-derive-inline.rs:379:5
--> $DIR/subdiagnostic-derive-inline.rs:387:5
|
LL | #[applicability]
| ^
|
note: previously specified here
--> $DIR/subdiagnostic-derive-inline.rs:376:5
--> $DIR/subdiagnostic-derive-inline.rs:384:5
|
LL | #[applicability]
| ^
error: derive(Diagnostic): the `#[applicability]` attribute can only be applied to fields of type `Applicability`
--> $DIR/subdiagnostic-derive-inline.rs:389:5
--> $DIR/subdiagnostic-derive-inline.rs:397:5
|
LL | #[applicability]
| ^
error: derive(Diagnostic): suggestion without `code = "..."`
--> $DIR/subdiagnostic-derive-inline.rs:402:1
--> $DIR/subdiagnostic-derive-inline.rs:410:1
|
LL | #[suggestion("example message")]
| ^
error: derive(Diagnostic): invalid applicability
--> $DIR/subdiagnostic-derive-inline.rs:412:63
--> $DIR/subdiagnostic-derive-inline.rs:420:63
|
LL | #[suggestion("example message", code = "...", applicability = "foo")]
| ^^^^^
error: derive(Diagnostic): suggestion without `#[primary_span]` field
--> $DIR/subdiagnostic-derive-inline.rs:430:1
--> $DIR/subdiagnostic-derive-inline.rs:438:1
|
LL | #[suggestion("example message", code = "...")]
| ^
error: derive(Diagnostic): unsupported type attribute for subdiagnostic enum
--> $DIR/subdiagnostic-derive-inline.rs:444:1
--> $DIR/subdiagnostic-derive-inline.rs:452:1
|
LL | #[label]
| ^
error: derive(Diagnostic): `var` doesn't refer to a field on this type
--> $DIR/subdiagnostic-derive-inline.rs:464:40
--> $DIR/subdiagnostic-derive-inline.rs:472:40
|
LL | #[suggestion("example message", code = "{var}", applicability = "machine-applicable")]
| ^^^^^^^
error: derive(Diagnostic): `var` doesn't refer to a field on this type
--> $DIR/subdiagnostic-derive-inline.rs:483:44
--> $DIR/subdiagnostic-derive-inline.rs:491:44
|
LL | #[suggestion("example message", code = "{var}", applicability = "machine-applicable")]
| ^^^^^^^
error: derive(Diagnostic): `#[suggestion_part]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:506:5
--> $DIR/subdiagnostic-derive-inline.rs:514:5
|
LL | #[suggestion_part]
| ^
@ -267,7 +267,7 @@ LL | #[suggestion_part]
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
error: derive(Diagnostic): `#[suggestion_part(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:509:5
--> $DIR/subdiagnostic-derive-inline.rs:517:5
|
LL | #[suggestion_part(code = "...")]
| ^
@ -275,13 +275,13 @@ LL | #[suggestion_part(code = "...")]
= help: `#[suggestion_part(...)]` is only valid in multipart suggestions
error: derive(Diagnostic): suggestion without `#[primary_span]` field
--> $DIR/subdiagnostic-derive-inline.rs:503:1
--> $DIR/subdiagnostic-derive-inline.rs:511:1
|
LL | #[suggestion("example message", code = "...")]
| ^
error: derive(Diagnostic): invalid nested attribute
--> $DIR/subdiagnostic-derive-inline.rs:518:43
--> $DIR/subdiagnostic-derive-inline.rs:526:43
|
LL | #[multipart_suggestion("example message", code = "...", applicability = "machine-applicable")]
| ^^^^
@ -289,25 +289,25 @@ LL | #[multipart_suggestion("example message", code = "...", applicability = "ma
= help: only `style` and `applicability` are valid nested attributes
error: derive(Diagnostic): multipart suggestion without any `#[suggestion_part(...)]` fields
--> $DIR/subdiagnostic-derive-inline.rs:518:1
--> $DIR/subdiagnostic-derive-inline.rs:526:1
|
LL | #[multipart_suggestion("example message", code = "...", applicability = "machine-applicable")]
| ^
error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive-inline.rs:528:5
--> $DIR/subdiagnostic-derive-inline.rs:536:5
|
LL | #[suggestion_part]
| ^
error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive-inline.rs:536:5
--> $DIR/subdiagnostic-derive-inline.rs:544:5
|
LL | #[suggestion_part()]
| ^
error: derive(Diagnostic): `#[primary_span]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:545:5
--> $DIR/subdiagnostic-derive-inline.rs:553:5
|
LL | #[primary_span]
| ^
@ -315,127 +315,127 @@ LL | #[primary_span]
= help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
error: derive(Diagnostic): multipart suggestion without any `#[suggestion_part(...)]` fields
--> $DIR/subdiagnostic-derive-inline.rs:542:1
--> $DIR/subdiagnostic-derive-inline.rs:550:1
|
LL | #[multipart_suggestion("example message")]
| ^
error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive-inline.rs:553:5
--> $DIR/subdiagnostic-derive-inline.rs:561:5
|
LL | #[suggestion_part]
| ^
error: derive(Diagnostic): `#[suggestion_part(...)]` attribute without `code = "..."`
--> $DIR/subdiagnostic-derive-inline.rs:556:5
--> $DIR/subdiagnostic-derive-inline.rs:564:5
|
LL | #[suggestion_part()]
| ^
error: derive(Diagnostic): `code` is the only valid nested attribute
--> $DIR/subdiagnostic-derive-inline.rs:559:23
--> $DIR/subdiagnostic-derive-inline.rs:567:23
|
LL | #[suggestion_part(foo = "bar")]
| ^^^
error: derive(Diagnostic): the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/subdiagnostic-derive-inline.rs:563:5
--> $DIR/subdiagnostic-derive-inline.rs:571:5
|
LL | #[suggestion_part(code = "...")]
| ^
error: derive(Diagnostic): the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
--> $DIR/subdiagnostic-derive-inline.rs:566:5
--> $DIR/subdiagnostic-derive-inline.rs:574:5
|
LL | #[suggestion_part()]
| ^
error: expected `,`
--> $DIR/subdiagnostic-derive-inline.rs:559:27
--> $DIR/subdiagnostic-derive-inline.rs:567:27
|
LL | #[suggestion_part(foo = "bar")]
| ^
error: derive(Diagnostic): attribute specified multiple times
--> $DIR/subdiagnostic-derive-inline.rs:574:37
--> $DIR/subdiagnostic-derive-inline.rs:582:37
|
LL | #[suggestion_part(code = "...", code = ",,,")]
| ^^^^
|
note: previously specified here
--> $DIR/subdiagnostic-derive-inline.rs:574:23
--> $DIR/subdiagnostic-derive-inline.rs:582:23
|
LL | #[suggestion_part(code = "...", code = ",,,")]
| ^^^^
error: derive(Diagnostic): `#[applicability]` has no effect if all `#[suggestion]`/`#[multipart_suggestion]` attributes have a static `applicability = "..."`
--> $DIR/subdiagnostic-derive-inline.rs:603:5
--> $DIR/subdiagnostic-derive-inline.rs:611:5
|
LL | #[applicability]
| ^
error: derive(Diagnostic): expected exactly one string literal for `code = ...`
--> $DIR/subdiagnostic-derive-inline.rs:651:28
--> $DIR/subdiagnostic-derive-inline.rs:659:28
|
LL | #[suggestion_part(code("foo"))]
| ^^^^^
error: unexpected token, expected `)`
--> $DIR/subdiagnostic-derive-inline.rs:651:28
--> $DIR/subdiagnostic-derive-inline.rs:659:28
|
LL | #[suggestion_part(code("foo"))]
| ^^^^^
error: derive(Diagnostic): expected exactly one string literal for `code = ...`
--> $DIR/subdiagnostic-derive-inline.rs:661:28
--> $DIR/subdiagnostic-derive-inline.rs:669:28
|
LL | #[suggestion_part(code("foo", "bar"))]
| ^^^^^
error: unexpected token, expected `)`
--> $DIR/subdiagnostic-derive-inline.rs:661:28
--> $DIR/subdiagnostic-derive-inline.rs:669:28
|
LL | #[suggestion_part(code("foo", "bar"))]
| ^^^^^
error: derive(Diagnostic): expected exactly one string literal for `code = ...`
--> $DIR/subdiagnostic-derive-inline.rs:671:28
--> $DIR/subdiagnostic-derive-inline.rs:679:28
|
LL | #[suggestion_part(code(3))]
| ^
error: unexpected token, expected `)`
--> $DIR/subdiagnostic-derive-inline.rs:671:28
--> $DIR/subdiagnostic-derive-inline.rs:679:28
|
LL | #[suggestion_part(code(3))]
| ^
error: derive(Diagnostic): expected exactly one string literal for `code = ...`
--> $DIR/subdiagnostic-derive-inline.rs:681:28
--> $DIR/subdiagnostic-derive-inline.rs:689:28
|
LL | #[suggestion_part(code())]
| ^
error: expected string literal
--> $DIR/subdiagnostic-derive-inline.rs:690:30
--> $DIR/subdiagnostic-derive-inline.rs:698:30
|
LL | #[suggestion_part(code = 3)]
| ^
error: derive(Diagnostic): attribute specified multiple times
--> $DIR/subdiagnostic-derive-inline.rs:732:1
--> $DIR/subdiagnostic-derive-inline.rs:740:1
|
LL | #[suggestion("example message", code = "", style = "hidden", style = "normal")]
| ^
|
note: previously specified here
--> $DIR/subdiagnostic-derive-inline.rs:732:1
--> $DIR/subdiagnostic-derive-inline.rs:740:1
|
LL | #[suggestion("example message", code = "", style = "hidden", style = "normal")]
| ^
error: derive(Diagnostic): `#[suggestion_hidden(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:741:1
--> $DIR/subdiagnostic-derive-inline.rs:749:1
|
LL | #[suggestion_hidden("example message", code = "")]
| ^
@ -443,7 +443,7 @@ LL | #[suggestion_hidden("example message", code = "")]
= help: Use `#[suggestion(..., style = "hidden")]` instead
error: derive(Diagnostic): `#[suggestion_hidden(...)]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:749:1
--> $DIR/subdiagnostic-derive-inline.rs:757:1
|
LL | #[suggestion_hidden("example message", code = "", style = "normal")]
| ^
@ -451,7 +451,7 @@ LL | #[suggestion_hidden("example message", code = "", style = "normal")]
= help: Use `#[suggestion(..., style = "hidden")]` instead
error: derive(Diagnostic): invalid suggestion style
--> $DIR/subdiagnostic-derive-inline.rs:757:52
--> $DIR/subdiagnostic-derive-inline.rs:765:52
|
LL | #[suggestion("example message", code = "", style = "foo")]
| ^^^^^
@ -459,25 +459,25 @@ LL | #[suggestion("example message", code = "", style = "foo")]
= help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only`
error: expected string literal
--> $DIR/subdiagnostic-derive-inline.rs:765:52
--> $DIR/subdiagnostic-derive-inline.rs:773:52
|
LL | #[suggestion("example message", code = "", style = 42)]
| ^^
error: expected `=`
--> $DIR/subdiagnostic-derive-inline.rs:773:49
--> $DIR/subdiagnostic-derive-inline.rs:781:49
|
LL | #[suggestion("example message", code = "", style)]
| ^
error: expected `=`
--> $DIR/subdiagnostic-derive-inline.rs:781:49
--> $DIR/subdiagnostic-derive-inline.rs:789:49
|
LL | #[suggestion("example message", code = "", style("foo"))]
| ^
error: derive(Diagnostic): `#[primary_span]` is not a valid attribute
--> $DIR/subdiagnostic-derive-inline.rs:792:5
--> $DIR/subdiagnostic-derive-inline.rs:800:5
|
LL | #[primary_span]
| ^
@ -486,7 +486,7 @@ LL | #[primary_span]
= help: to create a suggestion with multiple spans, use `#[multipart_suggestion]` instead
error: derive(Diagnostic): suggestion without `#[primary_span]` field
--> $DIR/subdiagnostic-derive-inline.rs:789:1
--> $DIR/subdiagnostic-derive-inline.rs:797:1
|
LL | #[suggestion("example message", code = "")]
| ^
@ -498,49 +498,49 @@ LL | #[foo]
| ^^^
error: cannot find attribute `foo` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:141:3
--> $DIR/subdiagnostic-derive-inline.rs:149:3
|
LL | #[foo]
| ^^^
error: cannot find attribute `bar` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:155:7
--> $DIR/subdiagnostic-derive-inline.rs:163:7
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:167:7
--> $DIR/subdiagnostic-derive-inline.rs:175:7
|
LL | #[bar = "..."]
| ^^^
error: cannot find attribute `bar` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:179:7
--> $DIR/subdiagnostic-derive-inline.rs:187:7
|
LL | #[bar = 4]
| ^^^
error: cannot find attribute `bar` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:191:7
--> $DIR/subdiagnostic-derive-inline.rs:199:7
|
LL | #[bar("...")]
| ^^^
error: cannot find attribute `bar` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:252:7
--> $DIR/subdiagnostic-derive-inline.rs:260:7
|
LL | #[bar]
| ^^^
error: cannot find attribute `bar` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:263:7
--> $DIR/subdiagnostic-derive-inline.rs:271:7
|
LL | #[bar = "..."]
| ^^^
error: cannot find attribute `bar` in this scope
--> $DIR/subdiagnostic-derive-inline.rs:274:7
--> $DIR/subdiagnostic-derive-inline.rs:282:7
|
LL | #[bar("...")]
| ^^^

View file

@ -56,7 +56,7 @@ fn main() {
// Check that the path of an attribute without a name is printed correctly (issue #140082)
#[::a]
//~^ ERROR attribute incompatible with `#[unsafe(naked)]`
//~| ERROR failed to resolve: use of unresolved module or unlinked crate `a`
//~| ERROR cannot find module or crate `a` in the crate root
#[unsafe(naked)]
extern "C" fn issue_140082() {
naked_asm!("")

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
error[E0433]: cannot find module or crate `a` in the crate root
--> $DIR/naked-invalid-attr.rs:57:5
|
LL | #[::a]

View file

@ -1,8 +1,8 @@
// Regression test for https://github.com/rust-lang/rust/issues/143789
#[must_use::skip]
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `must_use`
//~^ ERROR: cannot find module or crate `must_use`
fn main() { }
// Regression test for https://github.com/rust-lang/rust/issues/137590
struct S(#[stable::skip] u8, u16, u32);
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `stable`
//~^ ERROR: cannot find module or crate `stable`

View file

@ -1,10 +1,10 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `stable`
error[E0433]: cannot find module or crate `stable` in this scope
--> $DIR/builtin-attribute-prefix.rs:7:12
|
LL | struct S(#[stable::skip] u8, u16, u32);
| ^^^^^^ use of unresolved module or unlinked crate `stable`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `must_use`
error[E0433]: cannot find module or crate `must_use` in this scope
--> $DIR/builtin-attribute-prefix.rs:2:3
|
LL | #[must_use::skip]

View file

@ -43,11 +43,11 @@
struct Foo {
#[should_panic::skip]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
pub field: u8,
#[should_panic::a::b::c]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
pub field2: u8,
}
@ -55,6 +55,6 @@ fn foo() {}
fn main() {
#[deny::skip]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
foo();
}

View file

@ -1,16 +1,16 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `should_panic`
error[E0433]: cannot find module or crate `should_panic` in this scope
--> $DIR/check-builtin-attr-ice.rs:45:7
|
LL | #[should_panic::skip]
| ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `should_panic`
error[E0433]: cannot find module or crate `should_panic` in this scope
--> $DIR/check-builtin-attr-ice.rs:49:7
|
LL | #[should_panic::a::b::c]
| ^^^^^^^^^^^^ use of unresolved module or unlinked crate `should_panic`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `deny`
error[E0433]: cannot find module or crate `deny` in this scope
--> $DIR/check-builtin-attr-ice.rs:57:7
|
LL | #[deny::skip]

View file

@ -10,27 +10,27 @@
#![crate_type = "lib"]
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
mod we_are_no_strangers_to_love {}
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
struct YouKnowTheRules {
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
and_so_do_i: u8,
}
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
fn a_full_commitment() {
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
let is_what_i_am_thinking_of = ();
}
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
union AnyOtherGuy {
owo: ()
}
@ -39,30 +39,30 @@ struct This;
#[cfg_attr(FALSE, doc = "you wouldn't get this")]
impl From<AnyOtherGuy> for This {
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
fn from(#[cfg_attr::no_such_thing] any_other_guy: AnyOtherGuy) -> This {
//~^ ERROR failed to resolve
//~^ ERROR cannot find
#[cfg_attr::no_such_thing]
//~^ ERROR attributes on expressions are experimental
//~| ERROR failed to resolve
//~| ERROR cannot find
unreachable!()
}
}
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
enum NeverGonna {
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
GiveYouUp(#[cfg_attr::no_such_thing] u8),
//~^ ERROR failed to resolve
//~^ ERROR cannot find
LetYouDown {
#![cfg_attr::no_such_thing]
//~^ ERROR an inner attribute is not permitted in this context
never_gonna: (),
round_around: (),
#[cfg_attr::no_such_thing]
//~^ ERROR failed to resolve
//~^ ERROR cannot find
and_desert_you: (),
},
}

View file

@ -17,79 +17,79 @@ LL | #[cfg_attr::no_such_thing]
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:52:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:55:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:57:17
|
LL | GiveYouUp(#[cfg_attr::no_such_thing] u8),
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:64:11
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:41:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:43:15
|
LL | fn from(#[cfg_attr::no_such_thing] any_other_guy: AnyOtherGuy) -> This {
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:45:11
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:32:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:24:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:27:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:16:3
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:19:7
|
LL | #[cfg_attr::no_such_thing]
| ^^^^^^^^ use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `cfg_attr`
error[E0433]: cannot find module or crate `cfg_attr` in this scope
--> $DIR/check-cfg_attr-ice.rs:12:3
|
LL | #[cfg_attr::no_such_thing]

View file

@ -2,5 +2,5 @@
mod existent {}
#[existent::nonexistent] //~ ERROR failed to resolve: could not find `nonexistent` in `existent`
#[existent::nonexistent] //~ ERROR cannot find `nonexistent` in `existent`
fn main() {}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: could not find `nonexistent` in `existent`
error[E0433]: cannot find `nonexistent` in `existent`
--> $DIR/custom_attr_multisegment_error.rs:5:13
|
LL | #[existent::nonexistent]

View file

@ -15,12 +15,12 @@ mod internal {
struct S {
#[rustfmt::skip]
pub(in nonexistent) field: u8 //~ ERROR failed to resolve
pub(in nonexistent) field: u8 //~ ERROR cannot find
}
struct Z(
#[rustfmt::skip]
pub(in nonexistent) u8 //~ ERROR failed to resolve
pub(in nonexistent) u8 //~ ERROR cannot find
);
fn main() {}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
error[E0433]: cannot find module or crate `nonexistent` in the crate root
--> $DIR/field-attributes-vis-unresolved.rs:18:12
|
LL | pub(in nonexistent) field: u8
@ -9,7 +9,7 @@ help: you might be missing a crate named `nonexistent`, add it to your project a
LL + extern crate nonexistent;
|
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
error[E0433]: cannot find module or crate `nonexistent` in the crate root
--> $DIR/field-attributes-vis-unresolved.rs:23:12
|
LL | pub(in nonexistent) u8

View file

@ -1,15 +1,15 @@
// issue#140255
#[macro_use::a] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_use`
#[macro_use::a] //~ ERROR cannot find
fn f0() {}
#[macro_use::a::b] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_use`
#[macro_use::a::b] //~ ERROR cannot find
fn f1() {}
#[macro_escape::a] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_escape`
#[macro_escape::a] //~ ERROR cannot find
fn f2() {}
#[macro_escape::a::b] //~ ERROR failed to resolve: use of unresolved module or unlinked crate `macro_escape`
#[macro_escape::a::b] //~ ERROR cannot find
fn f3() {}
fn main() {}

View file

@ -1,22 +1,22 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_escape`
error[E0433]: cannot find module or crate `macro_escape` in this scope
--> $DIR/illegal-macro-use.rs:12:3
|
LL | #[macro_escape::a::b]
| ^^^^^^^^^^^^ use of unresolved module or unlinked crate `macro_escape`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_escape`
error[E0433]: cannot find module or crate `macro_escape` in this scope
--> $DIR/illegal-macro-use.rs:9:3
|
LL | #[macro_escape::a]
| ^^^^^^^^^^^^ use of unresolved module or unlinked crate `macro_escape`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_use`
error[E0433]: cannot find module or crate `macro_use` in this scope
--> $DIR/illegal-macro-use.rs:6:3
|
LL | #[macro_use::a::b]
| ^^^^^^^^^ use of unresolved module or unlinked crate `macro_use`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `macro_use`
error[E0433]: cannot find module or crate `macro_use` in this scope
--> $DIR/illegal-macro-use.rs:3:3
|
LL | #[macro_use::a]

View file

@ -42,7 +42,7 @@ fn main() {
//~| HELP: `S5` has a name defined in the doc alias attribute as `DocAliasS5`
not_exist_module::DocAliasS1;
//~^ ERROR: use of unresolved module or unlinked crate `not_exist_module`
//~^ ERROR: cannot find module or crate `not_exist_module`
//~| HELP: you might be missing a crate named `not_exist_module`
use_doc_alias_name_extern::DocAliasS1;
@ -50,7 +50,7 @@ fn main() {
//~| HELP: `S1` has a name defined in the doc alias attribute as `DocAliasS1`
m::n::DocAliasX::y::S6;
//~^ ERROR: could not find `DocAliasX` in `n`
//~^ ERROR: cannot find `DocAliasX` in `n`
//~| HELP: `x` has a name defined in the doc alias attribute as `DocAliasX`
m::n::x::y::DocAliasS6;

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: could not find `DocAliasX` in `n`
error[E0433]: cannot find `DocAliasX` in `n`
--> $DIR/use-doc-alias-name.rs:52:11
|
LL | m::n::DocAliasX::y::S6;
@ -136,7 +136,7 @@ LL - doc_alias_f2();
LL + f();
|
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `not_exist_module`
error[E0433]: cannot find module or crate `not_exist_module` in this scope
--> $DIR/use-doc-alias-name.rs:44:5
|
LL | not_exist_module::DocAliasS1;

View file

@ -4,9 +4,9 @@
fn main() {
let mut a = E::StructVar { boxed: Box::new(5_i32) };
//~^ ERROR failed to resolve: use of undeclared type `E`
//~^ ERROR cannot find type `E`
match a {
E::StructVar { box boxed } => { }
//~^ ERROR failed to resolve: use of undeclared type `E`
//~^ ERROR cannot find type `E`
}
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `E`
error[E0433]: cannot find type `E` in this scope
--> $DIR/non-ADT-struct-pattern-box-pattern-ice-121463.rs:6:17
|
LL | let mut a = E::StructVar { boxed: Box::new(5_i32) };
@ -9,7 +9,7 @@ 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`
error[E0433]: cannot find type `E` in this scope
--> $DIR/non-ADT-struct-pattern-box-pattern-ice-121463.rs:9:9
|
LL | E::StructVar { box boxed } => { }

View file

@ -14,7 +14,7 @@ fn main() {
// The module isn't found - we would like to get a diagnostic, but currently don't due to
// the awkward way the resolver diagnostics are currently implemented.
cfged_out::inner::doesnt_exist::hello(); //~ ERROR failed to resolve
cfged_out::inner::doesnt_exist::hello(); //~ ERROR cannot find
//~^ NOTE could not find `doesnt_exist` in `inner`
//~| NOTE found an item that was configured out

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
error[E0433]: cannot find `doesnt_exist` in `inner`
--> $DIR/diagnostics-cross-crate.rs:17:23
|
LL | cfged_out::inner::doesnt_exist::hello();

View file

@ -40,22 +40,22 @@ mod reexport32 {
fn main() {
reexport::gated::foo();
//~^ ERROR failed to resolve: could not find `gated` in `reexport`
//~^ ERROR cannot find
//~| NOTE could not find `gated` in `reexport`
reexport2::gated::foo();
//~^ ERROR failed to resolve: could not find `gated` in `reexport2`
//~^ ERROR cannot find
//~| NOTE could not find `gated` in `reexport2`
reexport30::gated::foo();
//~^ ERROR failed to resolve: could not find `gated` in `reexport30`
//~^ ERROR cannot find
//~| NOTE could not find `gated` in `reexport30`
reexport31::gated::foo();
//~^ ERROR failed to resolve: could not find `gated` in `reexport31`
//~^ ERROR cannot find
//~| NOTE could not find `gated` in `reexport31`
reexport32::gated::foo();
//~^ ERROR failed to resolve: could not find `gated` in `reexport32`
//~^ ERROR cannot find
//~| NOTE could not find `gated` in `reexport32`
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: could not find `gated` in `reexport`
error[E0433]: cannot find `gated` in `reexport`
--> $DIR/diagnostics-reexport-2.rs:42:15
|
LL | reexport::gated::foo();
@ -13,7 +13,7 @@ LL | #[cfg(false)]
LL | pub mod gated {
| ^^^^^
error[E0433]: failed to resolve: could not find `gated` in `reexport2`
error[E0433]: cannot find `gated` in `reexport2`
--> $DIR/diagnostics-reexport-2.rs:46:16
|
LL | reexport2::gated::foo();
@ -28,7 +28,7 @@ LL | #[cfg(false)]
LL | pub mod gated {
| ^^^^^
error[E0433]: failed to resolve: could not find `gated` in `reexport30`
error[E0433]: cannot find `gated` in `reexport30`
--> $DIR/diagnostics-reexport-2.rs:50:17
|
LL | reexport30::gated::foo();
@ -43,7 +43,7 @@ LL | #[cfg(false)]
LL | pub mod gated {
| ^^^^^
error[E0433]: failed to resolve: could not find `gated` in `reexport31`
error[E0433]: cannot find `gated` in `reexport31`
--> $DIR/diagnostics-reexport-2.rs:54:17
|
LL | reexport31::gated::foo();
@ -58,7 +58,7 @@ LL | #[cfg(false)]
LL | pub mod gated {
| ^^^^^
error[E0433]: failed to resolve: could not find `gated` in `reexport32`
error[E0433]: cannot find `gated` in `reexport32`
--> $DIR/diagnostics-reexport-2.rs:58:17
|
LL | reexport32::gated::foo();

View file

@ -50,7 +50,7 @@ fn main() {
//~| NOTE not found in `inner`
// The module isn't found - we get a diagnostic.
inner::doesnt_exist::hello(); //~ ERROR failed to resolve
inner::doesnt_exist::hello(); //~ ERROR cannot find
//~| NOTE could not find `doesnt_exist` in `inner`
// It should find the one in the right module, not the wrong one.

View file

@ -28,7 +28,7 @@ LL | #[cfg(false)]
LL | pub mod doesnt_exist {
| ^^^^^^^^^^^^
error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
error[E0433]: cannot find `doesnt_exist` in `inner`
--> $DIR/diagnostics-same-crate.rs:53:12
|
LL | inner::doesnt_exist::hello();

View file

@ -1,8 +1,8 @@
struct ErrorKind;
struct Error(ErrorKind);
impl From<nope::Thing> for Error { //~ ERROR failed to resolve
fn from(_: nope::Thing) -> Self { //~ ERROR failed to resolve
impl From<nope::Thing> for Error { //~ ERROR cannot find
fn from(_: nope::Thing) -> Self { //~ ERROR cannot find
unimplemented!()
}
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope`
error[E0433]: cannot find module or crate `nope` in this scope
--> $DIR/conflicting-impl-with-err.rs:4:11
|
LL | impl From<nope::Thing> for Error {
@ -6,7 +6,7 @@ LL | impl From<nope::Thing> for Error {
|
= help: you might be missing a crate named `nope`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nope`
error[E0433]: cannot find module or crate `nope` in this scope
--> $DIR/conflicting-impl-with-err.rs:5:16
|
LL | fn from(_: nope::Thing) -> Self {

View file

@ -11,7 +11,7 @@ where
//~^ ERROR only lifetime parameters can be used in this context
//~| ERROR defaults for generic parameters are not allowed in `for<...>` binders
//~| ERROR defaults for generic parameters are not allowed in `for<...>` binders
//~| ERROR failed to resolve: use of undeclared type `COT`
//~| ERROR cannot find
//~| ERROR the name `N` is already used for a generic parameter in this item's generic parameters
{
}

View file

@ -43,7 +43,7 @@ error: defaults for generic parameters are not allowed in `for<...>` binders
LL | for<const N: usize = 3, T = u32> [(); COT::BYTES]:,
| ^^^^^^^
error[E0433]: failed to resolve: use of undeclared type `COT`
error[E0433]: cannot find type `COT` in this scope
--> $DIR/ice-predicates-of-no-entry-found-for-key-119275.rs:10:43
|
LL | for<const N: usize = 3, T = u32> [(); COT::BYTES]:,

View file

@ -24,7 +24,7 @@ where
fn pop(self) -> (Self::Newlen, Self::Output) {
let mut iter = IntoIter::new(self);
//~^ ERROR: failed to resolve: use of undeclared type `IntoIter`
//~^ ERROR: cannot find
let end = iter.next_back().unwrap();
let new = [(); N - 1].map(move |()| iter.next().unwrap());
(new, end)

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `IntoIter`
error[E0433]: cannot find type `IntoIter` in this scope
--> $DIR/issue-82956.rs:26:24
|
LL | let mut iter = IntoIter::new(self);

View file

@ -7,7 +7,7 @@
const REF_INTERIOR_MUT: &usize = {
//~^ HELP consider importing this struct
static FOO: Sync = AtomicUsize::new(0);
//~^ ERROR failed to resolve: use of undeclared type `AtomicUsize`
//~^ ERROR cannot find
//~| WARN trait objects without an explicit `dyn` are deprecated
//~| ERROR the size for values of type `(dyn Sync + 'static)` cannot be known at compilation time
//~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `AtomicUsize`
error[E0433]: cannot find type `AtomicUsize` in this scope
--> $DIR/const_refs_to_static-ice-121413.rs:9:24
|
LL | static FOO: Sync = AtomicUsize::new(0);

View file

@ -40,7 +40,7 @@ impl Trait for S {
}
mod prefix {}
reuse unresolved_prefix::{a, b, c}; //~ ERROR use of unresolved module or unlinked crate
reuse unresolved_prefix::{a, b, c}; //~ ERROR cannot find module or crate `unresolved_prefix`
reuse prefix::{self, super, crate}; //~ ERROR `crate` in paths can only be used in start position
fn main() {}

View file

@ -91,7 +91,7 @@ LL | type Type;
LL | impl Trait for S {
| ^^^^^^^^^^^^^^^^ missing `Type` in implementation
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved_prefix`
error[E0433]: cannot find module or crate `unresolved_prefix` in this scope
--> $DIR/bad-resolve.rs:43:7
|
LL | reuse unresolved_prefix::{a, b, c};
@ -99,11 +99,11 @@ LL | reuse unresolved_prefix::{a, b, c};
|
= help: you might be missing a crate named `unresolved_prefix`
error[E0433]: failed to resolve: `crate` in paths can only be used in start position
error[E0433]: `crate` in paths can only be used in start position
--> $DIR/bad-resolve.rs:44:29
|
LL | reuse prefix::{self, super, crate};
| ^^^^^ `crate` in paths can only be used in start position
| ^^^^^ can only be used in path start position
error: aborting due to 12 previous errors

View file

@ -5,7 +5,7 @@ trait Trait {}
struct S;
impl Trait for u8 {
reuse unresolved::*; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `unresolved`
reuse unresolved::*; //~ ERROR cannot find module or crate `unresolved`
reuse S::*; //~ ERROR expected trait, found struct `S`
}

View file

@ -4,7 +4,7 @@ error: expected trait, found struct `S`
LL | reuse S::*;
| ^ not a trait
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved`
error[E0433]: cannot find module or crate `unresolved` in this scope
--> $DIR/glob-bad-path.rs:8:11
|
LL | reuse unresolved::*;

View file

@ -4,7 +4,7 @@
mod unresolved {
struct S;
reuse impl unresolved for S { self.0 }
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `unresolved`
//~^ ERROR cannot find module or crate `unresolved` in this scope
//~| ERROR cannot find trait `unresolved` in this scope
trait T {}

View file

@ -16,7 +16,7 @@ error: expected trait, found module `TraitModule`
LL | reuse impl TraitModule for S { self.0 }
| ^^^^^^^^^^^ not a trait
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `unresolved`
error[E0433]: cannot find module or crate `unresolved` in this scope
--> $DIR/impl-reuse-bad-path.rs:6:16
|
LL | reuse impl unresolved for S { self.0 }

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `HashMap`
error[E0433]: cannot find type `HashMap` in this scope
--> $DIR/issue-31997-1.rs:20:19
|
LL | let mut map = HashMap::new();

View file

@ -2,12 +2,18 @@ mod a {}
macro_rules! m {
() => {
use a::$crate; //~ ERROR unresolved import `a::$crate`
use a::$crate::b; //~ ERROR `$crate` in paths can only be used in start position
type A = a::$crate; //~ ERROR `$crate` in paths can only be used in start position
use a::$crate; //~ ERROR: unresolved import `a::$crate`
//~^ NOTE: no `$crate` in `a`
use a::$crate::b; //~ ERROR: `$crate` in paths can only be used in start position
//~^ NOTE: can only be used in path start position
type A = a::$crate; //~ ERROR: `$crate` in paths can only be used in start position
//~^ NOTE: can only be used in path start position
}
}
m!();
//~^ NOTE: in this expansion
//~| NOTE: in this expansion
//~| NOTE: in this expansion
fn main() {}

View file

@ -1,8 +1,8 @@
error[E0433]: failed to resolve: `$crate` in paths can only be used in start position
--> $DIR/dollar-crate-is-keyword-2.rs:6:16
error[E0433]: `$crate` in paths can only be used in start position
--> $DIR/dollar-crate-is-keyword-2.rs:7:16
|
LL | use a::$crate::b;
| ^^^^^^ `$crate` in paths can only be used in start position
| ^^^^^^ can only be used in path start position
...
LL | m!();
| ---- in this macro invocation
@ -20,11 +20,11 @@ LL | m!();
|
= note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: `$crate` in paths can only be used in start position
--> $DIR/dollar-crate-is-keyword-2.rs:7:21
error[E0433]: `$crate` in paths can only be used in start position
--> $DIR/dollar-crate-is-keyword-2.rs:9:21
|
LL | type A = a::$crate;
| ^^^^^^ `$crate` in paths can only be used in start position
| ^^^^^^ can only be used in path start position
...
LL | m!();
| ---- in this macro invocation

View file

@ -13,7 +13,7 @@ fn eii1_impl(x: u64) {
println!("{x:?}")
}
#[codegen::eii3] //~ ERROR failed to resolve: could not find `eii3` in `codegen`
#[codegen::eii3] //~ ERROR cannot find `eii3` in `codegen`
fn eii3_impl(x: u64) {
println!("{x:?}")
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: could not find `eii3` in `codegen`
error[E0433]: cannot find `eii3` in `codegen`
--> $DIR/privacy2.rs:16:12
|
LL | #[codegen::eii3]

View file

@ -12,5 +12,6 @@ impl E {
}
fn main() {
E::A::f(); //~ ERROR failed to resolve: `A` is a variant, not a module
E::A::f(); //~ ERROR cannot find module `A` in `E`
//~^ NOTE: `A` is a variant, not a module
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: `A` is a variant, not a module
error[E0433]: cannot find module `A` in `E`
--> $DIR/assoc-fn-call-on-variant.rs:15:8
|
LL | E::A::f();

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `NonExistingMap`
error[E0433]: cannot find type `NonExistingMap` in this scope
--> $DIR/E0433.rs:2:15
|
LL | let map = NonExistingMap::new();

View file

@ -16,5 +16,5 @@ pub mod m {
}
fn main() {
somedep::somefun(); //~ ERROR failed to resolve
somedep::somefun(); //~ ERROR cannot find
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `somedep`
error[E0433]: cannot find module or crate `somedep` in this scope
--> $DIR/multiple-opts.rs:19:5
|
LL | somedep::somefun();

View file

@ -3,5 +3,5 @@
//@ edition:2018
fn main() {
somedep::somefun(); //~ ERROR failed to resolve
somedep::somefun(); //~ ERROR cannot find
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `somedep`
error[E0433]: cannot find module or crate `somedep` in this scope
--> $DIR/noprelude.rs:6:5
|
LL | somedep::somefun();

View file

@ -2,5 +2,5 @@
fn main() {
enum Foo {}
let _ = Foo::bar!(); //~ ERROR failed to resolve: partially resolved path in a macro
let _ = Foo::bar!(); //~ ERROR cannot find macro `bar` in enum `Foo`
}

View file

@ -1,8 +1,8 @@
error[E0433]: failed to resolve: partially resolved path in a macro
error[E0433]: cannot find macro `bar` in enum `Foo`
--> $DIR/extern-macro.rs:5:13
|
LL | let _ = Foo::bar!();
| ^^^^^^^^ partially resolved path in a macro
| ^^^^^^^^ a macro can't exist within an enum
error: aborting due to 1 previous error

View file

@ -2,5 +2,5 @@
use core::default; //~ ERROR unresolved import `core`
fn main() {
let _: u8 = ::core::default::Default(); //~ ERROR failed to resolve
let _: u8 = ::core::default::Default(); //~ ERROR cannot find
}

View file

@ -7,7 +7,7 @@ LL | use core::default;
| you might be missing crate `core`
| help: try using `std` instead of `core`: `std`
error[E0433]: failed to resolve: you might be missing crate `core`
error[E0433]: cannot find `core` in the crate root
--> $DIR/feature-gate-extern_absolute_paths.rs:5:19
|
LL | let _: u8 = ::core::default::Default();

View file

@ -1,4 +1,4 @@
extern "C" fn _f() -> libc::uintptr_t {}
//~^ ERROR failed to resolve
//~^ ERROR cannot find
fn main() {}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `libc`
error[E0433]: cannot find module or crate `libc` in this scope
--> $DIR/stashed-issue-121451.rs:1:23
|
LL | extern "C" fn _f() -> libc::uintptr_t {}

View file

@ -8,7 +8,7 @@ fn sum2<I: Iterator>(i: I) -> i32 where I::Item = i32 {
}
fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {
//~^ ERROR equality constraints are not yet supported in `where` clauses
//~| ERROR failed to resolve: use of undeclared type `I`
//~| ERROR cannot find type `I`
panic!()
}

View file

@ -200,7 +200,7 @@ 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`
error[E0433]: cannot find type `I` in this scope
--> $DIR/equality-bound.rs:9:41
|
LL | fn sum3<J: Iterator>(i: J) -> i32 where I::Item = i32 {

View file

@ -10,7 +10,7 @@ macro a() {
mod u {
// Late resolution.
fn f() { my_core::mem::drop(0); }
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core`
//~^ ERROR cannot find
}
}
@ -23,7 +23,7 @@ mod v {
mod u {
// Late resolution.
fn f() { my_core::mem::drop(0); }
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core`
//~^ ERROR cannot find
}
fn main() {}

View file

@ -15,7 +15,7 @@ LL | a!();
|
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core`
error[E0433]: cannot find module or crate `my_core` in this scope
--> $DIR/extern-prelude-from-opaque-fail-2018.rs:12:18
|
LL | fn f() { my_core::mem::drop(0); }
@ -29,7 +29,7 @@ LL | a!();
std::mem
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core`
error[E0433]: cannot find module or crate `my_core` in this scope
--> $DIR/extern-prelude-from-opaque-fail-2018.rs:25:14
|
LL | fn f() { my_core::mem::drop(0); }

View file

@ -10,7 +10,7 @@ macro a() {
mod u {
// Late resolution.
fn f() { my_core::mem::drop(0); }
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core`
//~^ ERROR cannot find
}
}
@ -23,7 +23,7 @@ mod v {
mod u {
// Late resolution.
fn f() { my_core::mem::drop(0); }
//~^ ERROR failed to resolve: use of unresolved module or unlinked crate `my_core`
//~^ ERROR cannot find
}
fn main() {}

View file

@ -15,7 +15,7 @@ LL | a!();
|
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core`
error[E0433]: cannot find module or crate `my_core` in this scope
--> $DIR/extern-prelude-from-opaque-fail.rs:12:18
|
LL | fn f() { my_core::mem::drop(0); }
@ -29,7 +29,7 @@ LL | a!();
my_core::mem
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `my_core`
error[E0433]: cannot find module or crate `my_core` in this scope
--> $DIR/extern-prelude-from-opaque-fail.rs:25:14
|
LL | fn f() { my_core::mem::drop(0); }

View file

@ -9,7 +9,7 @@ mod foo {
#[no_implicit_prelude]
mod bar {
pub macro m() {
Vec::new(); //~ ERROR failed to resolve
Vec::new(); //~ ERROR cannot find
().clone() //~ ERROR no method named `clone` found
}
fn f() {

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of undeclared type `Vec`
error[E0433]: cannot find type `Vec` in this scope
--> $DIR/no_implicit_prelude.rs:12:9
|
LL | fn f() { ::bar::m!(); }

View file

@ -9,12 +9,12 @@ pub fn gather_all() -> impl Iterator<Item = Lint> {
}
fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator<Item = Lint> {
//~^ ERROR: failed to resolve
//~^ ERROR: cannot find
unimplemented!()
}
fn lint_files() -> impl Iterator<Item = foo::MissingItem> {
//~^ ERROR: failed to resolve
//~^ ERROR: cannot find
unimplemented!()
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `foo`
error[E0433]: cannot find module or crate `foo` in this scope
--> $DIR/issue-72911.rs:11:33
|
LL | fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator<Item = Lint> {
@ -6,7 +6,7 @@ LL | fn gather_from_file(dir_entry: &foo::MissingItem) -> impl Iterator<Item = L
|
= help: you might be missing a crate named `foo`
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `foo`
error[E0433]: cannot find module or crate `foo` in this scope
--> $DIR/issue-72911.rs:16:41
|
LL | fn lint_files() -> impl Iterator<Item = foo::MissingItem> {

View file

@ -4,7 +4,7 @@ trait MyTrait {
async fn foo(self) -> (Self, i32);
}
impl MyTrait for xyz::T { //~ ERROR failed to resolve: use of unresolved module or unlinked crate `xyz`
impl MyTrait for xyz::T { //~ ERROR cannot find module or crate `xyz`
async fn foo(self, key: i32) -> (u32, i32) {
(self, key)
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `xyz`
error[E0433]: cannot find module or crate `xyz` in this scope
--> $DIR/stashed-diag-issue-121504.rs:7:18
|
LL | impl MyTrait for xyz::T {

View file

@ -3,9 +3,12 @@
mod foo {}
use foo::{
::bar, //~ ERROR crate root in paths can only be used in start position
super::bar, //~ ERROR `super` in paths can only be used in start position
self::bar, //~ ERROR `self` in paths can only be used in start position
::bar,
//~^ ERROR: crate root in paths can only be used in start position
super::bar,
//~^ ERROR: `super` in paths can only be used in start position
self::bar,
//~^ ERROR: `self` in paths can only be used in start position
};
fn main() {}

View file

@ -1,20 +1,20 @@
error[E0433]: failed to resolve: crate root in paths can only be used in start position
error[E0433]: the crate root in paths can only be used in start position
--> $DIR/absolute-paths-in-nested-use-groups.rs:6:5
|
LL | ::bar,
| ^ crate root in paths can only be used in start position
| ^ can only be used in path start position
error[E0433]: failed to resolve: `super` in paths can only be used in start position
--> $DIR/absolute-paths-in-nested-use-groups.rs:7:5
|
LL | super::bar,
| ^^^^^ `super` in paths can only be used in start position
error[E0433]: failed to resolve: `self` in paths can only be used in start position
error[E0433]: `super` in paths can only be used in start position
--> $DIR/absolute-paths-in-nested-use-groups.rs:8:5
|
LL | super::bar,
| ^^^^^ can only be used in path start position
error[E0433]: `self` in paths can only be used in start position
--> $DIR/absolute-paths-in-nested-use-groups.rs:10:5
|
LL | self::bar,
| ^^^^ `self` in paths can only be used in start position
| ^^^^ can only be used in path start position
error: aborting due to 3 previous errors

View file

@ -7,7 +7,7 @@ mod n {
mod m {
fn check() {
two_macros::m!(); //~ ERROR failed to resolve: use of unresolved module or unlinked crate `two_macros`
two_macros::m!(); //~ ERROR cannot find
}
}

View file

@ -9,7 +9,7 @@ LL | define_std_as_non_existent!();
|
= note: this error originates in the macro `define_std_as_non_existent` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `two_macros`
error[E0433]: cannot find module or crate `two_macros` in this scope
--> $DIR/extern-prelude-extern-crate-fail.rs:10:9
|
LL | two_macros::m!();

View file

@ -3,11 +3,11 @@
// caused by `{{root}}` appearing in diagnostic suggestions
mod A {
use Iuse::{ ::Fish }; //~ ERROR failed to resolve: use of unresolved module or unlinked crate
use Iuse::{ ::Fish }; //~ ERROR cannot find module or crate `Iuse` in the crate root
}
mod B {
use A::{::Fish}; //~ ERROR failed to resolve: crate root in paths can only be used in start position
use A::{::Fish}; //~ ERROR the crate root in paths can only be used in start position
}
fn main() {}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `Iuse`
error[E0433]: cannot find module or crate `Iuse` in the crate root
--> $DIR/nested-import-root-symbol-150103.rs:6:9
|
LL | use Iuse::{ ::Fish };
@ -9,11 +9,11 @@ help: you might be missing a crate named `Iuse`, add it to your project and impo
LL + extern crate Iuse;
|
error[E0433]: failed to resolve: crate root in paths can only be used in start position
error[E0433]: the crate root in paths can only be used in start position
--> $DIR/nested-import-root-symbol-150103.rs:10:13
|
LL | use A::{::Fish};
| ^ crate root in paths can only be used in start position
| ^ can only be used in path start position
error: aborting due to 2 previous errors

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: unresolved import
error[E0433]: cannot find `bar` in `crate`
--> $DIR/suggest-import-issue-120074.rs:14:35
|
LL | println!("Hello, {}!", crate::bar::do_the_thing);

View file

@ -1,23 +0,0 @@
error[E0433]: failed to resolve: unresolved import
--> $DIR/suggest-import-issue-120074.rs:14:35
|
LL | println!("Hello, {}!", crate::bar::do_the_thing);
| ^^^ unresolved import
|
help: a similar path exists
|
LL | println!("Hello, {}!", crate::foo::bar::do_the_thing);
| +++++
help: consider importing this module
|
LL + use foo::bar;
|
help: if you import `bar`, refer to it directly
|
LL - println!("Hello, {}!", crate::bar::do_the_thing);
LL + println!("Hello, {}!", bar::do_the_thing);
|
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0433`.

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: unresolved import
error[E0433]: cannot find `bar` in `crate`
--> $DIR/suggest-import-issue-120074.rs:14:35
|
LL | println!("Hello, {}!", crate::bar::do_the_thing);

View file

@ -11,5 +11,5 @@ pub mod foo {
}
fn main() {
println!("Hello, {}!", crate::bar::do_the_thing); //~ ERROR failed to resolve: unresolved import
println!("Hello, {}!", crate::bar::do_the_thing); //~ ERROR cannot find `bar` in `crate`
}

View file

@ -1,8 +1,8 @@
//@ edition:2015
use clippy::a; //~ ERROR unresolved import `clippy`
use clippy::a::b; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `clippy`
use clippy::a::b; //~ ERROR cannot find
use rustdoc::a; //~ ERROR unresolved import `rustdoc`
use rustdoc::a::b; //~ ERROR failed to resolve: use of unresolved module or unlinked crate `rustdoc`
use rustdoc::a::b; //~ ERROR cannot find
fn main() {}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `clippy`
error[E0433]: cannot find module or crate `clippy` in the crate root
--> $DIR/tool-mod-child.rs:3:5
|
LL | use clippy::a::b;
@ -20,7 +20,7 @@ help: you might be missing a crate named `clippy`, add it to your project and im
LL + extern crate clippy;
|
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `rustdoc`
error[E0433]: cannot find module or crate `rustdoc` in the crate root
--> $DIR/tool-mod-child.rs:6:5
|
LL | use rustdoc::a::b;

View file

@ -1,5 +1,5 @@
fn main() {
let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };
//~^ ERROR failed to resolve: could not find `imp` in `sys` [E0433]
//~^^ ERROR module `sys` is private [E0603]
//~^ ERROR: cannot find `imp` in `sys` [E0433]
//~| ERROR: module `sys` is private [E0603]
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: could not find `imp` in `sys`
error[E0433]: cannot find `imp` in `sys`
--> $DIR/issue-38857.rs:2:23
|
LL | let a = std::sys::imp::process::process_common::StdioPipes { ..panic!() };

View file

@ -1,6 +1,6 @@
trait Foo {}
#[derive(Foo::Anything)] //~ ERROR failed to resolve: partially resolved path in a derive macro
//~| ERROR failed to resolve: partially resolved path in a derive macro
#[derive(Foo::Anything)] //~ ERROR cannot find
//~| ERROR cannot find
struct S;
fn main() {}

View file

@ -1,14 +1,14 @@
error[E0433]: failed to resolve: partially resolved path in a derive macro
error[E0433]: cannot find derive macro `Anything` in trait `Foo`
--> $DIR/issue-46101.rs:2:10
|
LL | #[derive(Foo::Anything)]
| ^^^^^^^^^^^^^ partially resolved path in a derive macro
| ^^^^^^^^^^^^^ a derive macro can't exist within a trait
error[E0433]: failed to resolve: partially resolved path in a derive macro
error[E0433]: cannot find derive macro `Anything` in trait `Foo`
--> $DIR/issue-46101.rs:2:10
|
LL | #[derive(Foo::Anything)]
| ^^^^^^^^^^^^^ partially resolved path in a derive macro
| ^^^^^^^^^^^^^ a derive macro can't exist within a trait
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

View file

@ -1,3 +1,3 @@
fn main() {
let super = 22; //~ ERROR failed to resolve: there are too many leading `super` keywords
let super = 22; //~ ERROR too many leading `super` keywords
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: there are too many leading `super` keywords
error[E0433]: too many leading `super` keywords
--> $DIR/keyword-super-as-identifier.rs:2:9
|
LL | let super = 22;

View file

@ -1,3 +1,3 @@
fn main() {
let super: isize; //~ ERROR failed to resolve: there are too many leading `super` keywords
let super: isize; //~ ERROR: too many leading `super` keywords
}

View file

@ -1,4 +1,4 @@
error[E0433]: failed to resolve: there are too many leading `super` keywords
error[E0433]: too many leading `super` keywords
--> $DIR/keyword-super.rs:2:9
|
LL | let super: isize;

View file

@ -1,8 +1,8 @@
extern "C" {
fn bget(&self, index: [usize; Self::DIM]) -> bool {
//~^ ERROR incorrect function inside `extern` block
//~| ERROR `self` parameter is only allowed in associated functions
//~| ERROR failed to resolve: `Self`
//~^ ERROR: incorrect function inside `extern` block
//~| ERROR: `self` parameter is only allowed in associated functions
//~| ERROR: cannot find `Self`
type T<'a> = &'a str;
}
}

View file

@ -22,7 +22,7 @@ LL | fn bget(&self, index: [usize; Self::DIM]) -> bool {
|
= note: associated functions are those in `impl` or `trait` definitions
error[E0433]: failed to resolve: `Self` is only available in impls, traits, and type definitions
error[E0433]: cannot find `Self` in this scope
--> $DIR/issue-97194.rs:2:35
|
LL | fn bget(&self, index: [usize; Self::DIM]) -> bool {

View file

@ -4,7 +4,7 @@
// Typeck fails for the arg type as
// `Self` makes no sense here
fn func(a: Self::ItemsIterator) { //~ ERROR failed to resolve: `Self` is only available in impls, traits, and type definitions
fn func(a: Self::ItemsIterator) { //~ ERROR cannot find `Self`
a.into_iter();
}

Some files were not shown because too many files have changed in this diff Show more