adding test
This commit is contained in:
parent
fcfc796389
commit
eaff0fe36f
2 changed files with 17 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue