Rollup merge of #75328 - GuillaumeGomez:cleanup-e0749, r=Dylan-DPC
Cleanup E0749 r? @pickfire
This commit is contained in:
commit
f6c41fbed7
2 changed files with 20 additions and 5 deletions
|
@ -1,4 +1,19 @@
|
||||||
Negative impls are not allowed to have any items. Negative impls
|
An item was added on a negative impl.
|
||||||
declare that a trait is **not** implemented (and never will be) and
|
|
||||||
hence there is no need to specify the values for trait methods or
|
Erroneous code example:
|
||||||
other items.
|
|
||||||
|
```compile_fail,E0749
|
||||||
|
# #![feature(negative_impls)]
|
||||||
|
trait MyTrait {
|
||||||
|
type Foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl !MyTrait for u32 {
|
||||||
|
type Foo = i32; // error!
|
||||||
|
}
|
||||||
|
# fn main() {}
|
||||||
|
```
|
||||||
|
|
||||||
|
Negative impls are not allowed to have any items. Negative impls declare that a
|
||||||
|
trait is **not** implemented (and never will be) and hence there is no need to
|
||||||
|
specify the values for trait methods or other items.
|
||||||
|
|
|
@ -16,7 +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] = &["E0570", "E0601", "E0602", "E0639", "E0729", "E0749"];
|
const IGNORE_EXPLANATION_CHECK: &[&str] = &["E0570", "E0601", "E0602", "E0639", "E0729"];
|
||||||
|
|
||||||
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