Skip to content

Commit 2c899ff

Browse files
committed
doc: improve E0133 explanation
1 parent aca2057 commit 2c899ff

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/librustc/diagnostics.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,9 +731,14 @@ type X = u32; // ok!
731731
"##,
732732

733733
E0133: r##"
734-
Using unsafe functionality, such as dereferencing raw pointers and calling
735-
functions via FFI or marked as unsafe, is potentially dangerous and disallowed
736-
by safety checks. These safety checks can be relaxed for a section of the code
734+
Using unsafe functionality, is potentially dangerous and disallowed
735+
by safety checks. Examples:
736+
737+
- Dereferencing raw pointers
738+
- Calling functions via FFI
739+
- Calling functions marked unsafe
740+
741+
These safety checks can be relaxed for a section of the code
737742
by wrapping the unsafe instructions with an `unsafe` block. For instance:
738743
739744
```

0 commit comments

Comments
 (0)