Skip to content

Commit d636b5c

Browse files
author
Nick Hamann
committed
Improve examples in the E0255/E0256 error explanations.
1 parent 06aef33 commit d636b5c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ module.
100100
An example of this error:
101101
102102
```
103-
use foo::FOO; // error, do `use foo::FOO as BAR` instead
103+
use bar::foo; // error, do `use bar::foo as baz` instead
104104
105-
fn FOO() {}
105+
fn foo() {}
106106
107-
mod foo {
108-
pub const FOO: bool = true;
107+
mod bar {
108+
pub fn foo() {}
109109
}
110110
111111
fn main() {}
@@ -121,7 +121,7 @@ An example of this error:
121121
```
122122
use foo::Bar; // error
123123
124-
struct Bar;
124+
type Bar = u32;
125125
126126
mod foo {
127127
pub mod Bar { }

0 commit comments

Comments
 (0)