Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add another example for E0425 #27635

Merged
merged 2 commits into from
Aug 12, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ trait Foo {
Self; // error: unresolved name `Self`
}
}

// or:
let x = unknown_variable; // error: unresolved name `unknown_variable`
```

Please verify you didn't misspell the name or that you're not using an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify that the name wasn't misspelled and ensure that the identifier being referred to is valid for the given situation.

Expand All @@ -636,12 +639,17 @@ invalid object. Example:
enum something_that_does_exist {
foo
}

// or:
mod something_that_does_exist {
pub static foo : i32 = 0i32;
}

something_that_does_exist::foo; // ok!

// or:
let unknown_variable = 12u32;
let x = unknown_variable; // ok!
```
"##,

Expand Down