]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unused/unused-doc-comments-edge-cases.stderr
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[rust.git] / src / test / ui / unused / unused-doc-comments-edge-cases.stderr
1 error: expected expression, found keyword `else`
2   --> $DIR/unused-doc-comments-edge-cases.rs:17:5
3    |
4 LL |     else {
5    |     ^^^^ expected expression
6
7 error[E0658]: attributes on expressions are experimental
8   --> $DIR/unused-doc-comments-edge-cases.rs:23:5
9    |
10 LL |     /// useless doc comment
11    |     ^^^^^^^^^^^^^^^^^^^^^^^
12    |
13    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
14    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
15    = help: `///` is for documentation comments. For a plain comment, use `//`.
16
17 error: unused doc comment
18   --> $DIR/unused-doc-comments-edge-cases.rs:6:9
19    |
20 LL |         /// useless doc comment
21    |         ^^^^^^^^^^^^^^^^^^^^^^^
22 LL |
23 LL |         _ => false,
24    |         ---------- rustdoc does not generate documentation for match arms
25    |
26 note: the lint level is defined here
27   --> $DIR/unused-doc-comments-edge-cases.rs:1:9
28    |
29 LL | #![deny(unused_doc_comments)]
30    |         ^^^^^^^^^^^^^^^^^^^
31    = help: use `//` for a plain comment
32
33 error: unused doc comment
34   --> $DIR/unused-doc-comments-edge-cases.rs:23:5
35    |
36 LL |     /// useless doc comment
37    |     ^^^^^^^^^^^^^^^^^^^^^^^
38 ...
39 LL |     num == 3
40    |     --- rustdoc does not generate documentation for expressions
41    |
42    = help: use `//` for a plain comment
43
44 error[E0308]: mismatched types
45   --> $DIR/unused-doc-comments-edge-cases.rs:14:9
46    |
47 LL | /     if num == 3 {
48 LL | |         true
49    | |         ^^^^ expected `()`, found `bool`
50 LL | |     }
51    | |_____- expected this to be `()`
52    |
53 help: you might have meant to return this value
54    |
55 LL |         return true;
56    |         ^^^^^^     ^
57
58 error: aborting due to 5 previous errors
59
60 Some errors have detailed explanations: E0308, E0658.
61 For more information about an error, try `rustc --explain E0308`.