Skip to content

Commit

Permalink
Improve diagnostics E0425: use (public) items
Browse files Browse the repository at this point in the history
E0425: unresolved name
  • Loading branch information
liigo committed Jun 23, 2016
1 parent 6dcc2c1 commit 2d7bac7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/librustc_resolve/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,17 @@ Or:
let unknown_variable = 12u32;
let x = unknown_variable; // ok!
```
If the item is not defined in the current module, it must be imported using a
`use` statement, like so:
```ignore
use foo::bar;
bar();
```
If the item you are importing is not defined in some super-module of the
current module, then it must also be declared as public (e.g., `pub fn`).
"##,

E0426: r##"
Expand Down

0 comments on commit 2d7bac7

Please sign in to comment.