]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/unused_attributes-must_use.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / lint / unused / unused_attributes-must_use.stderr
1 error: unused attribute `must_use`
2   --> $DIR/unused_attributes-must_use.rs:58:1
3    |
4 LL | #[must_use]
5    | ^^^^^^^^^^^
6    |
7 note: the built-in attribute `must_use` will be ignored, since it's applied to the macro invocation `global_asm`
8   --> $DIR/unused_attributes-must_use.rs:59:1
9    |
10 LL | global_asm!("");
11    | ^^^^^^^^^^
12 note: the lint level is defined here
13   --> $DIR/unused_attributes-must_use.rs:2:9
14    |
15 LL | #![deny(unused_attributes, unused_must_use)]
16    |         ^^^^^^^^^^^^^^^^^
17
18 error: `#[must_use]` has no effect when applied to an extern crate
19   --> $DIR/unused_attributes-must_use.rs:5:1
20    |
21 LL | #[must_use]
22    | ^^^^^^^^^^^
23
24 error: `#[must_use]` has no effect when applied to a module
25   --> $DIR/unused_attributes-must_use.rs:8:1
26    |
27 LL | #[must_use]
28    | ^^^^^^^^^^^
29
30 error: `#[must_use]` has no effect when applied to a use
31   --> $DIR/unused_attributes-must_use.rs:11:1
32    |
33 LL | #[must_use]
34    | ^^^^^^^^^^^
35
36 error: `#[must_use]` has no effect when applied to a constant item
37   --> $DIR/unused_attributes-must_use.rs:14:1
38    |
39 LL | #[must_use]
40    | ^^^^^^^^^^^
41
42 error: `#[must_use]` has no effect when applied to a static item
43   --> $DIR/unused_attributes-must_use.rs:16:1
44    |
45 LL | #[must_use]
46    | ^^^^^^^^^^^
47
48 error: `#[must_use]` has no effect when applied to an implementation block
49   --> $DIR/unused_attributes-must_use.rs:33:1
50    |
51 LL | #[must_use]
52    | ^^^^^^^^^^^
53
54 error: `#[must_use]` has no effect when applied to a foreign module
55   --> $DIR/unused_attributes-must_use.rs:47:1
56    |
57 LL | #[must_use]
58    | ^^^^^^^^^^^
59
60 error: `#[must_use]` has no effect when applied to a type alias
61   --> $DIR/unused_attributes-must_use.rs:61:1
62    |
63 LL | #[must_use]
64    | ^^^^^^^^^^^
65
66 error: `#[must_use]` has no effect when applied to a type parameter
67   --> $DIR/unused_attributes-must_use.rs:64:8
68    |
69 LL | fn qux<#[must_use] T>(_: T) {}
70    |        ^^^^^^^^^^^
71
72 error: `#[must_use]` has no effect when applied to an implementation block
73   --> $DIR/unused_attributes-must_use.rs:79:1
74    |
75 LL | #[must_use]
76    | ^^^^^^^^^^^
77
78 error: `#[must_use]` has no effect when applied to a trait alias
79   --> $DIR/unused_attributes-must_use.rs:84:1
80    |
81 LL | #[must_use]
82    | ^^^^^^^^^^^
83
84 error: `#[must_use]` has no effect when applied to a macro def
85   --> $DIR/unused_attributes-must_use.rs:87:1
86    |
87 LL | #[must_use]
88    | ^^^^^^^^^^^
89
90 error: `#[must_use]` has no effect when applied to a statement
91   --> $DIR/unused_attributes-must_use.rs:95:5
92    |
93 LL |     #[must_use]
94    |     ^^^^^^^^^^^
95
96 error: `#[must_use]` has no effect when applied to a closure
97   --> $DIR/unused_attributes-must_use.rs:99:13
98    |
99 LL |     let x = #[must_use]
100    |             ^^^^^^^^^^^
101
102 error: `#[must_use]` has no effect when applied to an match arm
103   --> $DIR/unused_attributes-must_use.rs:121:9
104    |
105 LL |         #[must_use]
106    |         ^^^^^^^^^^^
107
108 error: `#[must_use]` has no effect when applied to a struct field
109   --> $DIR/unused_attributes-must_use.rs:129:28
110    |
111 LL |     let s = PatternField { #[must_use]  foo: 123 };
112    |                            ^^^^^^^^^^^
113
114 error: `#[must_use]` has no effect when applied to a pattern field
115   --> $DIR/unused_attributes-must_use.rs:130:24
116    |
117 LL |     let PatternField { #[must_use] foo } = s;
118    |                        ^^^^^^^^^^^
119
120 error: `#[must_use]` has no effect when applied to an associated const
121   --> $DIR/unused_attributes-must_use.rs:68:5
122    |
123 LL |     #[must_use]
124    |     ^^^^^^^^^^^
125
126 error: `#[must_use]` has no effect when applied to an associated type
127   --> $DIR/unused_attributes-must_use.rs:70:5
128    |
129 LL |     #[must_use]
130    |     ^^^^^^^^^^^
131
132 error: `#[must_use]` has no effect when applied to a foreign static item
133   --> $DIR/unused_attributes-must_use.rs:50:5
134    |
135 LL |     #[must_use]
136    |     ^^^^^^^^^^^
137
138 error: unused `X` that must be used
139   --> $DIR/unused_attributes-must_use.rs:103:5
140    |
141 LL |     X;
142    |     ^
143    |
144 note: the lint level is defined here
145   --> $DIR/unused_attributes-must_use.rs:2:28
146    |
147 LL | #![deny(unused_attributes, unused_must_use)]
148    |                            ^^^^^^^^^^^^^^^
149
150 error: unused `Y` that must be used
151   --> $DIR/unused_attributes-must_use.rs:104:5
152    |
153 LL |     Y::Z;
154    |     ^^^^
155
156 error: unused `U` that must be used
157   --> $DIR/unused_attributes-must_use.rs:105:5
158    |
159 LL |     U { unit: () };
160    |     ^^^^^^^^^^^^^^
161
162 error: unused return value of `U::method` that must be used
163   --> $DIR/unused_attributes-must_use.rs:106:5
164    |
165 LL |     U::method();
166    |     ^^^^^^^^^^^
167
168 error: unused return value of `foo` that must be used
169   --> $DIR/unused_attributes-must_use.rs:107:5
170    |
171 LL |     foo();
172    |     ^^^^^
173
174 error: unused return value of `foreign_foo` that must be used
175   --> $DIR/unused_attributes-must_use.rs:110:9
176    |
177 LL |         foreign_foo();
178    |         ^^^^^^^^^^^^^
179
180 error: unused return value of `Use::get_four` that must be used
181   --> $DIR/unused_attributes-must_use.rs:118:5
182    |
183 LL |     ().get_four();
184    |     ^^^^^^^^^^^^^
185
186 error: aborting due to 28 previous errors
187