diff options
| author | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2015-08-19 19:47:01 +0200 |
|---|---|---|
| committer | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2015-08-19 19:47:01 +0200 |
| commit | 2c899ffe137a1ddbaecd19a2db0dcc8b09c2b35e (patch) | |
| tree | f7dd7feb8c57199191b95cb5d1d18cbc47613865 /src | |
| parent | aca2057ed5fb7af3f8905b2bc01f72fa001c35c8 (diff) | |
| download | rust-2c899ffe137a1ddbaecd19a2db0dcc8b09c2b35e.tar.gz rust-2c899ffe137a1ddbaecd19a2db0dcc8b09c2b35e.zip | |
doc: improve E0133 explanation
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/diagnostics.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs index baa9750d311..24d441a9ae3 100644 --- a/src/librustc/diagnostics.rs +++ b/src/librustc/diagnostics.rs @@ -731,9 +731,14 @@ type X = u32; // ok! "##, 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. These safety checks can be relaxed for a section of the code +Using unsafe functionality, is potentially dangerous and disallowed +by safety checks. Examples: + +- Dereferencing raw pointers +- Calling functions via FFI +- Calling functions marked unsafe + +These safety checks can be relaxed for a section of the code by wrapping the unsafe instructions with an `unsafe` block. For instance: ``` |
