File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 1
- Negative impls cannot be default impls. A default impl supplies
2
- default values for the items within to be used by other impls, whereas
3
- a negative impl declares that there are no other impls. These don't
4
- make sense to combine.
1
+ A negative impl was made default impl.
2
+
3
+ Erroneous code example:
4
+
5
+ ``` compile_fail,E0750
6
+ # #![feature(negative_impls)]
7
+ # #![feature(specialization)]
8
+ trait MyTrait {
9
+ type Foo;
10
+ }
11
+
12
+ default impl !MyTrait for u32 {} // error!
13
+ # fn main() {}
14
+ ```
15
+
16
+ Negative impls cannot be default impls. A default impl supplies default values
17
+ for the items within to be used by other impls, whereas a negative impl declares
18
+ that there are no other impls. Combining it does not make sense.
You can’t perform that action at this time.
0 commit comments