mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Update unused_doc_comments ui test
This commit is contained in:
parent
628fbdf9b7
commit
fce6cecf7a
@ -29,4 +29,18 @@ fn doc_comment_on_expr(num: u8) -> bool {
|
|||||||
fn doc_comment_on_generic<#[doc = "x"] T>(val: T) {}
|
fn doc_comment_on_generic<#[doc = "x"] T>(val: T) {}
|
||||||
//~^ ERROR: unused doc comment
|
//~^ ERROR: unused doc comment
|
||||||
|
|
||||||
|
fn doc_comment_on_block() {
|
||||||
|
/// unused doc comment
|
||||||
|
//~^ ERROR: unused doc comment
|
||||||
|
{
|
||||||
|
let x = 12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// unused doc comment
|
||||||
|
//~^ ERROR: unused doc comment
|
||||||
|
extern "C" {
|
||||||
|
fn foo();
|
||||||
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -49,6 +49,32 @@ LL | fn doc_comment_on_generic<#[doc = "x"] T>(val: T) {}
|
|||||||
|
|
|
|
||||||
= help: use `//` for a plain comment
|
= help: use `//` for a plain comment
|
||||||
|
|
||||||
|
error: unused doc comment
|
||||||
|
--> $DIR/unused-doc-comments-edge-cases.rs:33:5
|
||||||
|
|
|
||||||
|
LL | /// unused doc comment
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
LL |
|
||||||
|
LL | / {
|
||||||
|
LL | | let x = 12;
|
||||||
|
LL | | }
|
||||||
|
| |_____- rustdoc does not generate documentation for expressions
|
||||||
|
|
|
||||||
|
= help: use `//` for a plain comment
|
||||||
|
|
||||||
|
error: unused doc comment
|
||||||
|
--> $DIR/unused-doc-comments-edge-cases.rs:40:1
|
||||||
|
|
|
||||||
|
LL | /// unused doc comment
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
LL |
|
||||||
|
LL | / extern "C" {
|
||||||
|
LL | | fn foo();
|
||||||
|
LL | | }
|
||||||
|
| |_- rustdoc does not generate documentation for extern block
|
||||||
|
|
|
||||||
|
= help: use `//` for a plain comment
|
||||||
|
|
||||||
error[E0308]: mismatched types
|
error[E0308]: mismatched types
|
||||||
--> $DIR/unused-doc-comments-edge-cases.rs:14:9
|
--> $DIR/unused-doc-comments-edge-cases.rs:14:9
|
||||||
|
|
|
|
||||||
@ -63,7 +89,7 @@ help: you might have meant to return this value
|
|||||||
LL | return true;
|
LL | return true;
|
||||||
| ++++++ +
|
| ++++++ +
|
||||||
|
|
||||||
error: aborting due to 6 previous errors
|
error: aborting due to 8 previous errors
|
||||||
|
|
||||||
Some errors have detailed explanations: E0308, E0658.
|
Some errors have detailed explanations: E0308, E0658.
|
||||||
For more information about an error, try `rustc --explain E0308`.
|
For more information about an error, try `rustc --explain E0308`.
|
||||||
|
Loading…
Reference in New Issue
Block a user