2021-07-02 11:00:08 -05:00
|
|
|
error: expected expression, found keyword `else`
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:17:5
|
|
|
|
|
|
|
|
|
LL | else {
|
|
|
|
| ^^^^ expected expression
|
|
|
|
|
|
|
|
error[E0658]: attributes on expressions are experimental
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:23:5
|
|
|
|
|
|
|
|
|
LL | /// useless doc comment
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
|
|
|
|
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
|
|
|
|
= help: `///` is for documentation comments. For a plain comment, use `//`.
|
|
|
|
|
|
|
|
error: unused doc comment
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:6:9
|
|
|
|
|
|
|
|
|
LL | /// useless doc comment
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | _ => false,
|
|
|
|
| ---------- rustdoc does not generate documentation for match arms
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: use `//` for a plain comment
|
2021-07-02 11:00:08 -05:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:1:9
|
|
|
|
|
|
|
|
|
LL | #![deny(unused_doc_comments)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: unused doc comment
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:23:5
|
|
|
|
|
|
|
|
|
LL | /// useless doc comment
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | num == 3
|
|
|
|
| --- rustdoc does not generate documentation for expressions
|
|
|
|
|
|
|
|
|
= help: use `//` for a plain comment
|
|
|
|
|
2021-11-30 12:47:01 -06:00
|
|
|
error: unused doc comment
|
2023-09-02 21:51:18 -05:00
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:33:9
|
|
|
|
|
|
|
|
|
LL | /// useless doc comment
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | foo: 3
|
|
|
|
| ------ rustdoc does not generate documentation for expression fields
|
|
|
|
|
|
|
|
|
= help: use `//` for a plain comment
|
|
|
|
|
|
|
|
error: unused doc comment
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:45:9
|
|
|
|
|
|
|
|
|
LL | /// useless doc comment
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | foo
|
|
|
|
| --- rustdoc does not generate documentation for pattern fields
|
|
|
|
|
|
|
|
|
= help: use `//` for a plain comment
|
|
|
|
|
|
|
|
error: unused doc comment
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:55:27
|
2021-11-30 12:47:01 -06:00
|
|
|
|
|
|
|
|
LL | fn doc_comment_on_generic<#[doc = "x"] T>(val: T) {}
|
|
|
|
| ^^^^^^^^^^^^ - rustdoc does not generate documentation for generic parameters
|
|
|
|
|
|
|
|
|
= help: use `//` for a plain comment
|
|
|
|
|
2022-03-02 10:58:49 -06:00
|
|
|
error: unused doc comment
|
2023-09-02 21:51:18 -05:00
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:59:5
|
2022-03-02 10:58:49 -06:00
|
|
|
|
|
|
|
|
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
|
2023-09-02 21:51:18 -05:00
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:66:1
|
2022-03-02 10:58:49 -06:00
|
|
|
|
|
|
|
|
LL | /// unused doc comment
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | / extern "C" {
|
|
|
|
LL | | fn foo();
|
|
|
|
LL | | }
|
2022-06-30 15:17:38 -05:00
|
|
|
| |_- rustdoc does not generate documentation for extern blocks
|
2022-03-02 10:58:49 -06:00
|
|
|
|
|
|
|
|
= help: use `//` for a plain comment
|
|
|
|
|
2021-07-02 11:00:08 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/unused-doc-comments-edge-cases.rs:14:9
|
|
|
|
|
|
|
|
|
LL | / if num == 3 {
|
|
|
|
LL | | true
|
|
|
|
| | ^^^^ expected `()`, found `bool`
|
|
|
|
LL | | }
|
|
|
|
| |_____- expected this to be `()`
|
|
|
|
|
|
|
|
|
help: you might have meant to return this value
|
|
|
|
|
|
|
|
|
LL | return true;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++++++ +
|
2021-07-02 11:00:08 -05:00
|
|
|
|
2023-09-02 21:51:18 -05:00
|
|
|
error: aborting due to 10 previous errors
|
2021-07-02 11:00:08 -05:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0308, E0658.
|
|
|
|
For more information about an error, try `rustc --explain E0308`.
|