]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0200.md
Auto merge of #66396 - smmalis37:pythontest, r=alexcrichton
[rust.git] / src / librustc_error_codes / error_codes / E0200.md
1 Unsafe traits must have unsafe implementations. This error occurs when an
2 implementation for an unsafe trait isn't marked as unsafe. This may be resolved
3 by marking the unsafe implementation as unsafe.
4
5 ```compile_fail,E0200
6 struct Foo;
7
8 unsafe trait Bar { }
9
10 // this won't compile because Bar is unsafe and impl isn't unsafe
11 impl Bar for Foo { }
12 // this will compile
13 unsafe impl Bar for Foo { }
14 ```