1 error: unsafe block missing a safety comment
2 --> $DIR/undocumented_unsafe_blocks.rs:262:19
4 LL | /* Safety: */ unsafe {}
7 = help: consider adding a safety comment on the preceding line
8 = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings`
10 error: unsafe block missing a safety comment
11 --> $DIR/undocumented_unsafe_blocks.rs:266:5
16 = help: consider adding a safety comment on the preceding line
18 error: unsafe block missing a safety comment
19 --> $DIR/undocumented_unsafe_blocks.rs:270:14
21 LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
24 = help: consider adding a safety comment on the preceding line
26 error: unsafe block missing a safety comment
27 --> $DIR/undocumented_unsafe_blocks.rs:270:29
29 LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
32 = help: consider adding a safety comment on the preceding line
34 error: unsafe block missing a safety comment
35 --> $DIR/undocumented_unsafe_blocks.rs:270:48
37 LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
40 = help: consider adding a safety comment on the preceding line
42 error: unsafe block missing a safety comment
43 --> $DIR/undocumented_unsafe_blocks.rs:274:18
45 LL | let _ = (42, unsafe {}, "test", unsafe {});
48 = help: consider adding a safety comment on the preceding line
50 error: unsafe block missing a safety comment
51 --> $DIR/undocumented_unsafe_blocks.rs:274:37
53 LL | let _ = (42, unsafe {}, "test", unsafe {});
56 = help: consider adding a safety comment on the preceding line
58 error: unsafe block missing a safety comment
59 --> $DIR/undocumented_unsafe_blocks.rs:278:14
61 LL | let _ = *unsafe { &42 };
64 = help: consider adding a safety comment on the preceding line
66 error: unsafe block missing a safety comment
67 --> $DIR/undocumented_unsafe_blocks.rs:283:19
69 LL | let _ = match unsafe {} {
72 = help: consider adding a safety comment on the preceding line
74 error: unsafe block missing a safety comment
75 --> $DIR/undocumented_unsafe_blocks.rs:289:14
77 LL | let _ = &unsafe {};
80 = help: consider adding a safety comment on the preceding line
82 error: unsafe block missing a safety comment
83 --> $DIR/undocumented_unsafe_blocks.rs:293:14
85 LL | let _ = [unsafe {}; 5];
88 = help: consider adding a safety comment on the preceding line
90 error: unsafe block missing a safety comment
91 --> $DIR/undocumented_unsafe_blocks.rs:297:13
93 LL | let _ = unsafe {};
96 = help: consider adding a safety comment on the preceding line
98 error: unsafe block missing a safety comment
99 --> $DIR/undocumented_unsafe_blocks.rs:307:8
104 = help: consider adding a safety comment on the preceding line
106 error: unsafe block missing a safety comment
107 --> $DIR/undocumented_unsafe_blocks.rs:313:13
113 | ---- in this macro invocation
115 = help: consider adding a safety comment on the preceding line
116 = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
118 error: unsafe block missing a safety comment
119 --> $DIR/undocumented_unsafe_blocks.rs:321:5
121 LL | unsafe {} // SAFETY:
124 = help: consider adding a safety comment on the preceding line
126 error: unsafe block missing a safety comment
127 --> $DIR/undocumented_unsafe_blocks.rs:325:5
132 = help: consider adding a safety comment on the preceding line
134 error: unsafe block missing a safety comment
135 --> $DIR/undocumented_unsafe_blocks.rs:335:5
140 = help: consider adding a safety comment on the preceding line
142 error: unsafe block missing a safety comment
143 --> $DIR/undocumented_unsafe_blocks.rs:339:20
145 LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148 = help: consider adding a safety comment on the preceding line
150 error: unsafe impl missing a safety comment
151 --> $DIR/undocumented_unsafe_blocks.rs:346:5
153 LL | unsafe impl A for () {}
154 | ^^^^^^^^^^^^^^^^^^^^^^^
156 = help: consider adding a safety comment on the preceding line
158 error: unsafe impl missing a safety comment
159 --> $DIR/undocumented_unsafe_blocks.rs:353:9
161 LL | unsafe impl B for (u32) {}
162 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
164 = help: consider adding a safety comment on the preceding line
166 error: unsafe impl missing a safety comment
167 --> $DIR/undocumented_unsafe_blocks.rs:374:13
169 LL | unsafe impl T for $t {}
170 | ^^^^^^^^^^^^^^^^^^^^^^^
172 LL | no_safety_comment!(());
173 | ---------------------- in this macro invocation
175 = help: consider adding a safety comment on the preceding line
176 = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
178 error: unsafe impl missing a safety comment
179 --> $DIR/undocumented_unsafe_blocks.rs:399:13
181 LL | unsafe impl T for $t {}
182 | ^^^^^^^^^^^^^^^^^^^^^^^
184 LL | no_safety_comment!(());
185 | ---------------------- in this macro invocation
187 = help: consider adding a safety comment on the preceding line
188 = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
190 error: unsafe impl missing a safety comment
191 --> $DIR/undocumented_unsafe_blocks.rs:407:5
193 LL | unsafe impl T for (i32) {}
194 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
196 = help: consider adding a safety comment on the preceding line
198 error: unsafe impl missing a safety comment
199 --> $DIR/undocumented_unsafe_blocks.rs:399:13
201 LL | unsafe impl T for $t {}
202 | ^^^^^^^^^^^^^^^^^^^^^^^
204 LL | no_safety_comment!(u32);
205 | ----------------------- in this macro invocation
207 = help: consider adding a safety comment on the preceding line
208 = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
210 error: unsafe impl missing a safety comment
211 --> $DIR/undocumented_unsafe_blocks.rs:413:5
213 LL | unsafe impl T for (bool) {}
214 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
216 = help: consider adding a safety comment on the preceding line
218 error: unsafe impl missing a safety comment
219 --> $DIR/undocumented_unsafe_blocks.rs:459:5
221 LL | unsafe impl NoComment for () {}
222 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224 = help: consider adding a safety comment on the preceding line
226 error: unsafe impl missing a safety comment
227 --> $DIR/undocumented_unsafe_blocks.rs:463:19
229 LL | /* SAFETY: */ unsafe impl InlineComment for () {}
230 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
232 = help: consider adding a safety comment on the preceding line
234 error: unsafe impl missing a safety comment
235 --> $DIR/undocumented_unsafe_blocks.rs:467:5
237 LL | unsafe impl TrailingComment for () {} // SAFETY:
238 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240 = help: consider adding a safety comment on the preceding line
242 error: constant item has unnecessary safety comment
243 --> $DIR/undocumented_unsafe_blocks.rs:471:5
245 LL | const BIG_NUMBER: i32 = 1000000;
246 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248 help: consider removing the safety comment
249 --> $DIR/undocumented_unsafe_blocks.rs:470:5
253 = note: `-D clippy::unnecessary-safety-comment` implied by `-D warnings`
255 error: unsafe impl missing a safety comment
256 --> $DIR/undocumented_unsafe_blocks.rs:472:5
258 LL | unsafe impl Interference for () {}
259 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
261 = help: consider adding a safety comment on the preceding line
263 error: unsafe impl missing a safety comment
264 --> $DIR/undocumented_unsafe_blocks.rs:479:5
266 LL | unsafe impl ImplInFn for () {}
267 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
269 = help: consider adding a safety comment on the preceding line
271 error: unsafe impl missing a safety comment
272 --> $DIR/undocumented_unsafe_blocks.rs:488:1
274 LL | unsafe impl CrateRoot for () {}
275 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
277 = help: consider adding a safety comment on the preceding line
279 error: unsafe block missing a safety comment
280 --> $DIR/undocumented_unsafe_blocks.rs:498:9
285 = help: consider adding a safety comment on the preceding line
287 error: statement has unnecessary safety comment
288 --> $DIR/undocumented_unsafe_blocks.rs:501:5
291 LL | | if unsafe { true } {
299 help: consider removing the safety comment
300 --> $DIR/undocumented_unsafe_blocks.rs:500:5
302 LL | // SAFETY: this is more than one level away, so it should warn
303 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
305 error: unsafe block missing a safety comment
306 --> $DIR/undocumented_unsafe_blocks.rs:502:12
308 LL | if unsafe { true } {
311 = help: consider adding a safety comment on the preceding line
313 error: unsafe block missing a safety comment
314 --> $DIR/undocumented_unsafe_blocks.rs:505:23
316 LL | let bar = unsafe {};
319 = help: consider adding a safety comment on the preceding line
321 error: aborting due to 36 previous errors