]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0197.md
Rollup merge of #62514 - stephaneyfx:box-ffi, r=nikomatsakis
[rust.git] / src / librustc_error_codes / error_codes / E0197.md
1 Inherent implementations (one that do not implement a trait but provide
2 methods associated with a type) are always safe because they are not
3 implementing an unsafe trait. Removing the `unsafe` keyword from the inherent
4 implementation will resolve this error.
5
6 ```compile_fail,E0197
7 struct Foo;
8
9 // this will cause this error
10 unsafe impl Foo { }
11 // converting it to this will fix it
12 impl Foo { }
13 ```