Skip to content

Commit f6c41fb

Browse files
authored
Rollup merge of #75328 - GuillaumeGomez:cleanup-e0749, r=Dylan-DPC
Cleanup E0749 r? @pickfire
2 parents d8ac403 + 4e78760 commit f6c41fb

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

Diff for: src/librustc_error_codes/error_codes/E0749.md

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
Negative impls are not allowed to have any items. Negative impls
2-
declare that a trait is **not** implemented (and never will be) and
3-
hence there is no need to specify the values for trait methods or
4-
other items.
1+
An item was added on a negative impl.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0749
6+
# #![feature(negative_impls)]
7+
trait MyTrait {
8+
type Foo;
9+
}
10+
11+
impl !MyTrait for u32 {
12+
type Foo = i32; // error!
13+
}
14+
# fn main() {}
15+
```
16+
17+
Negative impls are not allowed to have any items. Negative impls declare that a
18+
trait is **not** implemented (and never will be) and hence there is no need to
19+
specify the values for trait methods or other items.

Diff for: src/tools/tidy/src/error_codes_check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +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] = &["E0570", "E0601", "E0602", "E0639", "E0729", "E0749"];
19+
const IGNORE_EXPLANATION_CHECK: &[&str] = &["E0570", "E0601", "E0602", "E0639", "E0729"];
2020

2121
fn check_error_code_explanation(
2222
f: &str,

0 commit comments

Comments
 (0)