Skip to content

Commit 3479915

Browse files
Add another example for E0425
1 parent febdc3b commit 3479915

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ 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
632635
Please verify you didn't misspell the name or that you're not using an
@@ -636,12 +639,17 @@ invalid object. Example:
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)