Rollup merge of #75291 - GuillaumeGomez:cleanup-e0750, r=pickfire
Clean up E0750 r? @Dylan-DPC
This commit is contained in:
commit
bc3ee48fd2
2 changed files with 19 additions and 6 deletions
|
@ -1,4 +1,18 @@
|
||||||
Negative impls cannot be default impls. A default impl supplies
|
A negative impl was made default impl.
|
||||||
default values for the items within to be used by other impls, whereas
|
|
||||||
a negative impl declares that there are no other impls. These don't
|
Erroneous code example:
|
||||||
make sense to combine.
|
|
||||||
|
```compile_fail,E0750
|
||||||
|
# #![feature(negative_impls)]
|
||||||
|
# #![feature(specialization)]
|
||||||
|
trait MyTrait {
|
||||||
|
type Foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
default impl !MyTrait for u32 {} // error!
|
||||||
|
# fn main() {}
|
||||||
|
```
|
||||||
|
|
||||||
|
Negative impls cannot be default impls. A default impl supplies default values
|
||||||
|
for the items within to be used by other impls, whereas a negative impl declares
|
||||||
|
that there are no other impls. Combining it does not make sense.
|
||||||
|
|
|
@ -16,8 +16,7 @@ const EXEMPTED_FROM_TEST: &[&str] = &[
|
||||||
];
|
];
|
||||||
|
|
||||||
// Some error codes don't have any tests apparently...
|
// Some error codes don't have any tests apparently...
|
||||||
const IGNORE_EXPLANATION_CHECK: &[&str] =
|
const IGNORE_EXPLANATION_CHECK: &[&str] = &["E0570", "E0601", "E0602", "E0639", "E0729", "E0749"];
|
||||||
&["E0570", "E0601", "E0602", "E0639", "E0729", "E0749", "E0750"];
|
|
||||||
|
|
||||||
fn check_error_code_explanation(
|
fn check_error_code_explanation(
|
||||||
f: &str,
|
f: &str,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue