summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused/unused-doc-comments-edge-cases.stderr
blob: 078b780d8b9bf90222770003d305c14e3bb87cc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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
   |
   = help: use `//` for a plain comment
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

error: unused doc comment
  --> $DIR/unused-doc-comments-edge-cases.rs:29:27
   |
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

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 blocks
   |
   = help: use `//` for a plain comment

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;
   |         ++++++     +

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.