diff options
Diffstat (limited to 'src/test/parse-fail/doc-after-struct-field.rs')
| -rw-r--r-- | src/test/parse-fail/doc-after-struct-field.rs | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/src/test/parse-fail/doc-after-struct-field.rs b/src/test/parse-fail/doc-after-struct-field.rs index 1aa6af5b78f..a2c60151ac7 100644 --- a/src/test/parse-fail/doc-after-struct-field.rs +++ b/src/test/parse-fail/doc-after-struct-field.rs @@ -9,12 +9,20 @@ // except according to those terms. // compile-flags: -Z continue-parse-after-error + struct X { a: u8 /** document a */, //~^ ERROR found a documentation comment that doesn't document anything //~| HELP maybe a comment was intended } +struct Y { + a: u8 /// document a + //~^ ERROR found a documentation comment that doesn't document anything + //~| HELP maybe a comment was intended +} + fn main() { - let y = X {a = 1}; + let x = X { a: 1 }; + let y = Y { a: 1 }; } | 
