Skip to content

Commit 726c9f2

Browse files
committed
rollup merge of rust-lang#27635: GuillaumeGomez/patch-4
r? @Manishearth
2 parents e837258 + f1e613e commit 726c9f2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,21 +627,29 @@ trait Foo {
627627
Self; // error: unresolved name `Self`
628628
}
629629
}
630+
631+
// or:
632+
let x = unknown_variable; // error: unresolved name `unknown_variable`
630633
```
631634
632-
Please verify you didn't misspell the name or that you're not using an
633-
invalid object. Example:
635+
Please verify that the name wasn't misspelled and ensure that the
636+
identifier being referred to is valid for the given situation. Example:
634637
635638
```
636639
enum something_that_does_exist {
637640
foo
638641
}
642+
639643
// or:
640644
mod something_that_does_exist {
641645
pub static foo : i32 = 0i32;
642646
}
643647
644648
something_that_does_exist::foo; // ok!
649+
650+
// or:
651+
let unknown_variable = 12u32;
652+
let x = unknown_variable; // ok!
645653
```
646654
"##,
647655

0 commit comments

Comments
 (0)