File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ // run-rustfix
2+
3+ #![allow(unused_variables)]
4+
5+ fn main() {
6+ let x = 1;
7+ //~^ ERROR visibility `pub` is not followed by an item
8+ //~^^ ERROR visibility does not apply to `let` statement
9+ }
Original file line number Diff line number Diff line change 1+ // run-rustfix
2+
3+ #![ allow( unused_variables) ]
4+
5+ fn main ( ) {
6+ pub let x = 1 ;
7+ //~^ ERROR visibility `pub` is not followed by an item
8+ //~^^ ERROR visibility does not apply to `let` statement
9+ }
Original file line number Diff line number Diff line change 1+ error: visibility `pub` is not followed by an item
2+ --> $DIR/pub-let.rs:6:5
3+ |
4+ LL | pub let x = 1;
5+ | ^^^ the visibility
6+ |
7+ = help: you likely meant to define an item, e.g., `pub fn foo() {}`
8+
9+ error: visibility does not apply to `let` statement
10+ --> $DIR/pub-let.rs:6:5
11+ |
12+ LL | pub let x = 1;
13+ | ^^^^^^^ help: remove pub: `let`
14+
15+ error: aborting due to 2 previous errors
16+
You can’t perform that action at this time.
0 commit comments