]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/unused-doc-comments-edge-cases.stderr
Auto merge of #106989 - clubby789:is-zero-num, r=scottmcm
[rust.git] / tests / ui / lint / 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    = help: use `//` for a plain comment
27 note: the lint level is defined here
28   --> $DIR/unused-doc-comments-edge-cases.rs:1:9
29    |
30 LL | #![deny(unused_doc_comments)]
31    |         ^^^^^^^^^^^^^^^^^^^
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: unused doc comment
45   --> $DIR/unused-doc-comments-edge-cases.rs:29:27
46    |
47 LL | fn doc_comment_on_generic<#[doc = "x"] T>(val: T) {}
48    |                           ^^^^^^^^^^^^ - rustdoc does not generate documentation for generic parameters
49    |
50    = help: use `//` for a plain comment
51
52 error: unused doc comment
53   --> $DIR/unused-doc-comments-edge-cases.rs:33:5
54    |
55 LL |       /// unused doc comment
56    |       ^^^^^^^^^^^^^^^^^^^^^^
57 LL |
58 LL | /     {
59 LL | |         let x = 12;
60 LL | |     }
61    | |_____- rustdoc does not generate documentation for expressions
62    |
63    = help: use `//` for a plain comment
64
65 error: unused doc comment
66   --> $DIR/unused-doc-comments-edge-cases.rs:40:1
67    |
68 LL |   /// unused doc comment
69    |   ^^^^^^^^^^^^^^^^^^^^^^
70 LL |
71 LL | / extern "C" {
72 LL | |     fn foo();
73 LL | | }
74    | |_- rustdoc does not generate documentation for extern blocks
75    |
76    = help: use `//` for a plain comment
77
78 error[E0308]: mismatched types
79   --> $DIR/unused-doc-comments-edge-cases.rs:14:9
80    |
81 LL | /     if num == 3 {
82 LL | |         true
83    | |         ^^^^ expected `()`, found `bool`
84 LL | |     }
85    | |_____- expected this to be `()`
86    |
87 help: you might have meant to return this value
88    |
89 LL |         return true;
90    |         ++++++     +
91
92 error: aborting due to 8 previous errors
93
94 Some errors have detailed explanations: E0308, E0658.
95 For more information about an error, try `rustc --explain E0308`.