Skip to content

Commit 312b301

Browse files
committed
Add long diagnostics for E0133.
1 parent 7a5754b commit 312b301

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
@@ -112,6 +112,21 @@ reference when using guards or refactor the entire expression, perhaps by
112112
putting the condition inside the body of the arm.
113113
"##,
114114

115+
E0133: r##"
116+
Using unsafe functionality, such as dereferencing raw pointers and calling
117+
functions via FFI or marked as unsafe, is potentially dangerous and disallowed
118+
by safety checks. As such, those safety checks can be temporarily relaxed by
119+
wrapping the unsafe instructions inside an `unsafe` block. For instance:
120+
121+
unsafe fn f() { return; }
122+
123+
fn main() {
124+
unsafe { f(); }
125+
}
126+
127+
See also http://doc.rust-lang.org/book/unsafe-code.html
128+
"##,
129+
115130
E0152: r##"
116131
Lang items are already implemented in the standard library. Unless you are
117132
writing a free-standing application (e.g. a kernel), you do not need to provide
@@ -325,7 +340,6 @@ register_diagnostics! {
325340
E0080, // enum variant: constant evaluation error
326341
E0109,
327342
E0110,
328-
E0133,
329343
E0134,
330344
E0135,
331345
E0136,

0 commit comments

Comments
 (0)