1error: visibility `pub` is not followed by an item
2  --> $DIR/issue-41155.rs:4:5
3   |
4LL |     pub
5   |     ^^^ the visibility
6   |
7   = help: you likely meant to define an item, e.g., `pub fn foo() {}`
8
9error: non-item in item list
10  --> $DIR/issue-41155.rs:5:1
11   |
12LL | impl S {
13   |        - item list starts here
14LL |     pub
15LL | }
16   | ^
17   | |
18   | non-item starts here
19   | item list ends here
20
21error: aborting due to 2 previous errors
22
23