From 312b3013e291f297af0afbe4000941877b068526 Mon Sep 17 00:00:00 2001 From: Ricardo Martins Date: Sat, 18 Apr 2015 12:02:37 +0100 Subject: [PATCH] Add long diagnostics for E0133. --- src/librustc/diagnostics.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index e1eb8d7418695..3d3af6aa98e95 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -112,6 +112,21 @@ reference when using guards or refactor the entire expression, perhaps by putting the condition inside the body of the arm. "##, +E0133: r##" +Using unsafe functionality, such as dereferencing raw pointers and calling +functions via FFI or marked as unsafe, is potentially dangerous and disallowed +by safety checks. As such, those safety checks can be temporarily relaxed by +wrapping the unsafe instructions inside an `unsafe` block. For instance: + +unsafe fn f() { return; } + +fn main() { + unsafe { f(); } +} + +See also http://doc.rust-lang.org/book/unsafe-code.html +"##, + E0152: r##" Lang items are already implemented in the standard library. Unless you are writing a free-standing application (e.g. a kernel), you do not need to provide @@ -325,7 +340,6 @@ register_diagnostics! { E0080, // enum variant: constant evaluation error E0109, E0110, - E0133, E0134, E0135, E0136,