adding test
This commit is contained in:
parent
fcfc796389
commit
eaff0fe36f
6
src/test/ui/parser/doc-inside-trait-item.rs
Normal file
6
src/test/ui/parser/doc-inside-trait-item.rs
Normal file
@ -0,0 +1,6 @@
|
||||
trait User{
|
||||
fn test();
|
||||
/// empty doc
|
||||
//~^ ERROR found a documentation comment that doesn't document anything
|
||||
}
|
||||
fn main() {}
|
11
src/test/ui/parser/doc-inside-trait-item.stderr
Normal file
11
src/test/ui/parser/doc-inside-trait-item.stderr
Normal file
@ -0,0 +1,11 @@
|
||||
error[E0584]: found a documentation comment that doesn't document anything
|
||||
--> $DIR/doc-inside-trait-item.rs:3:5
|
||||
|
|
||||
LL | /// empty doc
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: doc comments must come before what they document, maybe a comment was intended with `//`?
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0584`.
|
Loading…
x
Reference in New Issue
Block a user