diff options
| author | Nick Hamann <nick@wabbo.org> | 2015-05-14 02:50:39 -0500 |
|---|---|---|
| committer | Nick Hamann <nick@wabbo.org> | 2015-05-14 02:54:50 -0500 |
| commit | d636b5cf659771d74a5e225b751898f69a35ae9a (patch) | |
| tree | 9e5c95862b91c9a4c00924e6f81794503bcd45f8 | |
| parent | 06aef339f11091f178957350b5159081e7b4534a (diff) | |
| download | rust-d636b5cf659771d74a5e225b751898f69a35ae9a.tar.gz rust-d636b5cf659771d74a5e225b751898f69a35ae9a.zip | |
Improve examples in the E0255/E0256 error explanations.
| -rw-r--r-- | src/librustc_resolve/diagnostics.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_resolve/diagnostics.rs b/src/librustc_resolve/diagnostics.rs index cd941c65b9d..15ddcbc8074 100644 --- a/src/librustc_resolve/diagnostics.rs +++ b/src/librustc_resolve/diagnostics.rs @@ -100,12 +100,12 @@ module. An example of this error: ``` -use foo::FOO; // error, do `use foo::FOO as BAR` instead +use bar::foo; // error, do `use bar::foo as baz` instead -fn FOO() {} +fn foo() {} -mod foo { - pub const FOO: bool = true; +mod bar { + pub fn foo() {} } fn main() {} @@ -121,7 +121,7 @@ An example of this error: ``` use foo::Bar; // error -struct Bar; +type Bar = u32; mod foo { pub mod Bar { } |
