We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf84eb5 commit 9746b05Copy full SHA for 9746b05
src/librustc_error_codes/error_codes/E0200.md
@@ -1,14 +1,23 @@
1
+An unsafe trait was implemented without an unsafe implementation.
2
+
3
+Erroneous code example:
4
5
+```compile_fail,E0200
6
+struct Foo;
7
8
+unsafe trait Bar { }
9
10
+impl Bar for Foo { } // error!
11
+```
12
13
Unsafe traits must have unsafe implementations. This error occurs when an
14
implementation for an unsafe trait isn't marked as unsafe. This may be resolved
15
by marking the unsafe implementation as unsafe.
16
-```compile_fail,E0200
17
18
struct Foo;
19
20
unsafe trait Bar { }
21
-// this won't compile because Bar is unsafe and impl isn't unsafe
-impl Bar for Foo { }
-// this will compile
-unsafe impl Bar for Foo { }
22
+unsafe impl Bar for Foo { } // ok!
23
```
0 commit comments