File tree 1 file changed +9
-8
lines changed
src/librustc_error_codes/error_codes
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
- A negative implementation is one that excludes a type from implementing a
2
- particular trait. Not being able to use a trait is always a safe operation,
3
- so negative implementations are always safe and never need to be marked as
4
- unsafe.
1
+ A negative implementation was marked as unsafe.
5
2
6
- ``` compile_fail
7
- #![feature(optin_builtin_traits)]
3
+ Erroneous code example:
8
4
5
+ ``` compile_fail
9
6
struct Foo;
10
7
11
- // unsafe is unnecessary
12
- unsafe impl !Clone for Foo { }
8
+ unsafe impl !Clone for Foo { } // error!
13
9
```
14
10
11
+ A negative implementation is one that excludes a type from implementing a
12
+ particular trait. Not being able to use a trait is always a safe operation,
13
+ so negative implementations are always safe and never need to be marked as
14
+ unsafe.
15
+
15
16
This will compile:
16
17
17
18
``` ignore (ignore auto_trait future compatibility warning)
You can’t perform that action at this time.
0 commit comments