summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/unused/unused_attributes-must_use.stderr
blob: dd112c23e5d9eba0b27a8b7efb93ebd7e2a3b1be (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
error: unused attribute `must_use`
  --> $DIR/unused_attributes-must_use.rs:58:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^
   |
note: the lint level is defined here
  --> $DIR/unused_attributes-must_use.rs:2:9
   |
LL | #![deny(unused_attributes, unused_must_use)]
   |         ^^^^^^^^^^^^^^^^^
note: the built-in attribute `must_use` will be ignored, since it's applied to the macro invocation `global_asm`
  --> $DIR/unused_attributes-must_use.rs:59:1
   |
LL | global_asm!("");
   | ^^^^^^^^^^

error: `#[must_use]` has no effect when applied to an extern crate
  --> $DIR/unused_attributes-must_use.rs:5:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a module
  --> $DIR/unused_attributes-must_use.rs:8:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a use
  --> $DIR/unused_attributes-must_use.rs:11:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a constant item
  --> $DIR/unused_attributes-must_use.rs:14:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a static item
  --> $DIR/unused_attributes-must_use.rs:16:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to an implementation block
  --> $DIR/unused_attributes-must_use.rs:33:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a foreign module
  --> $DIR/unused_attributes-must_use.rs:47:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a type alias
  --> $DIR/unused_attributes-must_use.rs:61:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a type parameter
  --> $DIR/unused_attributes-must_use.rs:64:8
   |
LL | fn qux<#[must_use] T>(_: T) {}
   |        ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to an implementation block
  --> $DIR/unused_attributes-must_use.rs:79:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a trait alias
  --> $DIR/unused_attributes-must_use.rs:84:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a macro def
  --> $DIR/unused_attributes-must_use.rs:87:1
   |
LL | #[must_use]
   | ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a statement
  --> $DIR/unused_attributes-must_use.rs:95:5
   |
LL |     #[must_use]
   |     ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a closure
  --> $DIR/unused_attributes-must_use.rs:99:13
   |
LL |     let x = #[must_use]
   |             ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to an match arm
  --> $DIR/unused_attributes-must_use.rs:121:9
   |
LL |         #[must_use]
   |         ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a struct field
  --> $DIR/unused_attributes-must_use.rs:129:28
   |
LL |     let s = PatternField { #[must_use]  foo: 123 };
   |                            ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a pattern field
  --> $DIR/unused_attributes-must_use.rs:130:24
   |
LL |     let PatternField { #[must_use] foo } = s;
   |                        ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to an associated const
  --> $DIR/unused_attributes-must_use.rs:68:5
   |
LL |     #[must_use]
   |     ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to an associated type
  --> $DIR/unused_attributes-must_use.rs:70:5
   |
LL |     #[must_use]
   |     ^^^^^^^^^^^

error: `#[must_use]` has no effect when applied to a foreign static item
  --> $DIR/unused_attributes-must_use.rs:50:5
   |
LL |     #[must_use]
   |     ^^^^^^^^^^^

error: unused `X` that must be used
  --> $DIR/unused_attributes-must_use.rs:103:5
   |
LL |     X;
   |     ^^
   |
note: the lint level is defined here
  --> $DIR/unused_attributes-must_use.rs:2:28
   |
LL | #![deny(unused_attributes, unused_must_use)]
   |                            ^^^^^^^^^^^^^^^

error: unused `Y` that must be used
  --> $DIR/unused_attributes-must_use.rs:104:5
   |
LL |     Y::Z;
   |     ^^^^^

error: unused `U` that must be used
  --> $DIR/unused_attributes-must_use.rs:105:5
   |
LL |     U { unit: () };
   |     ^^^^^^^^^^^^^^^

error: unused return value of `U::method` that must be used
  --> $DIR/unused_attributes-must_use.rs:106:5
   |
LL |     U::method();
   |     ^^^^^^^^^^^^

error: unused return value of `foo` that must be used
  --> $DIR/unused_attributes-must_use.rs:107:5
   |
LL |     foo();
   |     ^^^^^^

error: unused return value of `foreign_foo` that must be used
  --> $DIR/unused_attributes-must_use.rs:110:9
   |
LL |         foreign_foo();
   |         ^^^^^^^^^^^^^^

error: unused return value of `Use::get_four` that must be used
  --> $DIR/unused_attributes-must_use.rs:118:5
   |
LL |     ().get_four();
   |     ^^^^^^^^^^^^^^

error: aborting due to 28 previous errors