permit negative impls for non-auto traits
This commit is contained in:
parent
a17dd36084
commit
e8a05e201e
35 changed files with 328 additions and 101 deletions
|
|
@ -97,7 +97,6 @@ E0184: include_str!("./error_codes/E0184.md"),
|
|||
E0185: include_str!("./error_codes/E0185.md"),
|
||||
E0186: include_str!("./error_codes/E0186.md"),
|
||||
E0191: include_str!("./error_codes/E0191.md"),
|
||||
E0192: include_str!("./error_codes/E0192.md"),
|
||||
E0193: include_str!("./error_codes/E0193.md"),
|
||||
E0195: include_str!("./error_codes/E0195.md"),
|
||||
E0197: include_str!("./error_codes/E0197.md"),
|
||||
|
|
@ -426,6 +425,8 @@ E0745: include_str!("./error_codes/E0745.md"),
|
|||
E0746: include_str!("./error_codes/E0746.md"),
|
||||
E0747: include_str!("./error_codes/E0747.md"),
|
||||
E0748: include_str!("./error_codes/E0748.md"),
|
||||
E0749: include_str!("./error_codes/E0749.md"),
|
||||
E0750: include_str!("./error_codes/E0750.md"),
|
||||
;
|
||||
// E0006, // merged with E0005
|
||||
// E0008, // cannot bind by-move into a pattern guard
|
||||
|
|
@ -460,6 +461,7 @@ E0748: include_str!("./error_codes/E0748.md"),
|
|||
// E0188, // can not cast an immutable reference to a mutable pointer
|
||||
// E0189, // deprecated: can only cast a boxed pointer to a boxed object
|
||||
// E0190, // deprecated: can only cast a &-pointer to an &-object
|
||||
// E0192, // negative impl only applicable to auto traits
|
||||
// E0194, // merged into E0403
|
||||
// E0196, // cannot determine a type for this closure
|
||||
E0208,
|
||||
|
|
|
|||
4
src/librustc_error_codes/error_codes/E0749.md
Normal file
4
src/librustc_error_codes/error_codes/E0749.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
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.
|
||||
4
src/librustc_error_codes/error_codes/E0750.md
Normal file
4
src/librustc_error_codes/error_codes/E0750.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
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. These don't
|
||||
make sense to combine.
|
||||
Loading…
Add table
Add a link
Reference in a new issue