Skip to content

Commit bc3ee48

Browse files
authored
Rollup merge of #75291 - GuillaumeGomez:cleanup-e0750, r=pickfire
Clean up E0750 r? @Dylan-DPC
2 parents 55f2490 + 17db7a4 commit bc3ee48

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed
Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
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.

src/tools/tidy/src/error_codes_check.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ const EXEMPTED_FROM_TEST: &[&str] = &[
1616
];
1717

1818
// Some error codes don't have any tests apparently...
19-
const IGNORE_EXPLANATION_CHECK: &[&str] =
20-
&["E0570", "E0601", "E0602", "E0639", "E0729", "E0749", "E0750"];
19+
const IGNORE_EXPLANATION_CHECK: &[&str] = &["E0570", "E0601", "E0602", "E0639", "E0729", "E0749"];
2120

2221
fn check_error_code_explanation(
2322
f: &str,

0 commit comments

Comments
 (0)