Skip to content

Commit 781de1e

Browse files
committed
Add test enum-lack-comma-suggestion-issue-142311.rs
Signed-off-by: xizheyin <[email protected]>
1 parent b6685d7 commit 781de1e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
enum Foo {
2+
/// Like the noise a sheep makes
3+
Bar
4+
/// Like where people drink
5+
//~^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found doc comment `/// Like where people drink`
6+
Baa
7+
}
8+
9+
fn main() {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error: expected one of `(`, `,`, `=`, `{`, or `}`, found doc comment `/// Like where people drink`
2+
--> $DIR/enum-lack-comma-suggestion-issue-142311.rs:4:5
3+
|
4+
LL | Bar
5+
| - expected one of `(`, `,`, `=`, `{`, or `}`
6+
LL | /// Like where people drink
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ unexpected token
8+
|
9+
help: add a space before the last `/` to write a regular comment
10+
|
11+
LL | // / Like where people drink
12+
| +
13+
help: missing `,`
14+
|
15+
LL | Bar,
16+
| +
17+
18+
error: aborting due to 1 previous error
19+

0 commit comments

Comments
 (0)