]> git.lizzy.rs Git - rust.git/blob - tests/ui/undocumented_unsafe_blocks.stderr
Auto merge of #7971 - togami2864:fix/option-map-or-none, r=llogiq
[rust.git] / tests / ui / undocumented_unsafe_blocks.stderr
1 error: unsafe block missing a safety comment
2   --> $DIR/undocumented_unsafe_blocks.rs:215:5
3    |
4 LL |     unsafe {}
5    |     ^^^^^^^^^
6    |
7    = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings`
8 help: consider adding a safety comment
9    |
10 LL ~     // Safety: ...
11 LL +     unsafe {}
12    |
13
14 error: unsafe block missing a safety comment
15   --> $DIR/undocumented_unsafe_blocks.rs:219:5
16    |
17 LL |     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
18    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19    |
20 help: consider adding a safety comment
21    |
22 LL ~     // Safety: ...
23 LL +     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
24    |
25
26 error: unsafe block missing a safety comment
27   --> $DIR/undocumented_unsafe_blocks.rs:223:5
28    |
29 LL |     let _ = (42, unsafe {}, "test", unsafe {});
30    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31    |
32 help: consider adding a safety comment
33    |
34 LL ~     // Safety: ...
35 LL +     let _ = (42, unsafe {}, "test", unsafe {});
36    |
37
38 error: unsafe block missing a safety comment
39   --> $DIR/undocumented_unsafe_blocks.rs:227:5
40    |
41 LL |     let _ = *unsafe { &42 };
42    |     ^^^^^^^^^^^^^^^^^^^^^^^^
43    |
44 help: consider adding a safety comment
45    |
46 LL ~     // Safety: ...
47 LL +     let _ = *unsafe { &42 };
48    |
49
50 error: unsafe block missing a safety comment
51   --> $DIR/undocumented_unsafe_blocks.rs:232:5
52    |
53 LL |     let _ = match unsafe {} {
54    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
55    |
56 help: consider adding a safety comment
57    |
58 LL ~     // Safety: ...
59 LL +     let _ = match unsafe {} {
60    |
61
62 error: unsafe block missing a safety comment
63   --> $DIR/undocumented_unsafe_blocks.rs:238:5
64    |
65 LL |     let _ = &unsafe {};
66    |     ^^^^^^^^^^^^^^^^^^^
67    |
68 help: consider adding a safety comment
69    |
70 LL ~     // Safety: ...
71 LL +     let _ = &unsafe {};
72    |
73
74 error: unsafe block missing a safety comment
75   --> $DIR/undocumented_unsafe_blocks.rs:242:5
76    |
77 LL |     let _ = [unsafe {}; 5];
78    |     ^^^^^^^^^^^^^^^^^^^^^^^
79    |
80 help: consider adding a safety comment
81    |
82 LL ~     // Safety: ...
83 LL +     let _ = [unsafe {}; 5];
84    |
85
86 error: unsafe block missing a safety comment
87   --> $DIR/undocumented_unsafe_blocks.rs:246:5
88    |
89 LL |     let _ = unsafe {};
90    |     ^^^^^^^^^^^^^^^^^^
91    |
92 help: consider adding a safety comment
93    |
94 LL ~     // Safety: ...
95 LL +     let _ = unsafe {};
96    |
97
98 error: unsafe block missing a safety comment
99   --> $DIR/undocumented_unsafe_blocks.rs:256:8
100    |
101 LL |     t!(unsafe {});
102    |        ^^^^^^^^^
103    |
104 help: consider adding a safety comment
105    |
106 LL ~     t!(// Safety: ...
107 LL ~     unsafe {});
108    |
109
110 error: unsafe block in macro expansion missing a safety comment
111   --> $DIR/undocumented_unsafe_blocks.rs:262:13
112    |
113 LL |             unsafe {}
114    |             ^^^^^^^^^
115 ...
116 LL |     t!();
117    |     ---- in this macro invocation
118    |
119    = help: consider adding a safety comment in the macro definition
120    = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
121
122 error: unsafe block missing a safety comment
123   --> $DIR/undocumented_unsafe_blocks.rs:270:5
124    |
125 LL |     unsafe {} // Safety:
126    |     ^^^^^^^^^
127    |
128 help: consider adding a safety comment
129    |
130 LL ~     // Safety: ...
131 LL ~     unsafe {} // Safety:
132    |
133
134 error: unsafe block missing a safety comment
135   --> $DIR/undocumented_unsafe_blocks.rs:274:5
136    |
137 LL |     unsafe {
138    |     ^^^^^^^^
139    |
140 help: consider adding a safety comment
141    |
142 LL ~     // Safety: ...
143 LL +     unsafe {
144    |
145
146 error: unsafe block missing a safety comment
147   --> $DIR/undocumented_unsafe_blocks.rs:284:5
148    |
149 LL |     unsafe {};
150    |     ^^^^^^^^^
151    |
152 help: consider adding a safety comment
153    |
154 LL ~     // Safety: ...
155 LL ~     unsafe {};
156    |
157
158 error: unsafe block missing a safety comment
159   --> $DIR/undocumented_unsafe_blocks.rs:288:20
160    |
161 LL |     println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
162    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
163    |
164 help: consider adding a safety comment
165    |
166 LL ~     println!("{}", // Safety: ...
167 LL ~     unsafe { String::from_utf8_unchecked(vec![]) });
168    |
169
170 error: aborting due to 14 previous errors
171