Skip to content

Commit 14d9d1c

Browse files
committed
Auto merge of #24552 - meqif:explain, r=alexcrichton
cc #24407
2 parents 049de3f + 5c7a0ba commit 14d9d1c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/librustc/diagnostics.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,21 @@ This error indicates that an attempt was made to divide by zero (or take the
173173
remainder of a zero divisor) in a static or constant expression.
174174
"##,
175175

176+
E0133: r##"
177+
Using unsafe functionality, such as dereferencing raw pointers and calling
178+
functions via FFI or marked as unsafe, is potentially dangerous and disallowed
179+
by safety checks. As such, those safety checks can be temporarily relaxed by
180+
wrapping the unsafe instructions inside an `unsafe` block. For instance:
181+
182+
unsafe fn f() { return; }
183+
184+
fn main() {
185+
unsafe { f(); }
186+
}
187+
188+
See also http://doc.rust-lang.org/book/unsafe-code.html
189+
"##,
190+
176191
E0152: r##"
177192
Lang items are already implemented in the standard library. Unless you are
178193
writing a free-standing application (e.g. a kernel), you do not need to provide
@@ -405,7 +420,6 @@ register_diagnostics! {
405420
E0080, // enum variant: constant evaluation error
406421
E0109,
407422
E0110,
408-
E0133,
409423
E0134,
410424
E0135,
411425
E0136,

0 commit comments

Comments
 (0)