Add explanation message for E0224
This commit is contained in:
parent
98803c182b
commit
97aa2704ec
@ -118,6 +118,7 @@ E0220: include_str!("./error_codes/E0220.md"),
|
||||
E0221: include_str!("./error_codes/E0221.md"),
|
||||
E0222: include_str!("./error_codes/E0222.md"),
|
||||
E0223: include_str!("./error_codes/E0223.md"),
|
||||
E0224: include_str!("./error_codes/E0224.md"),
|
||||
E0225: include_str!("./error_codes/E0225.md"),
|
||||
E0229: include_str!("./error_codes/E0229.md"),
|
||||
E0230: include_str!("./error_codes/E0230.md"),
|
||||
@ -469,7 +470,6 @@ E0748: include_str!("./error_codes/E0748.md"),
|
||||
// E0217, // ambiguous associated type, defined in multiple supertraits
|
||||
// E0218, // no associated type defined
|
||||
// E0219, // associated type defined in higher-ranked supertrait
|
||||
E0224, // at least one non-builtin train is required for an object type
|
||||
E0226, // only a single explicit lifetime bound is permitted
|
||||
E0227, // ambiguous lifetime bound, explicit lifetime bound required
|
||||
E0228, // explicit lifetime bound required
|
||||
|
15
src/librustc_error_codes/error_codes/E0224.md
Normal file
15
src/librustc_error_codes/error_codes/E0224.md
Normal file
@ -0,0 +1,15 @@
|
||||
A trait object was declaired with no traits.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0224
|
||||
type Foo = dyn 'static +;
|
||||
```
|
||||
|
||||
Rust does not currently support this.
|
||||
|
||||
To solve ensure the the trait object has at least one trait:
|
||||
|
||||
```
|
||||
type Foo = dyn 'static + Copy;
|
||||
```
|
@ -20,3 +20,4 @@ LL | type X<'a> = (?'a) +;
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0224`.
|
||||
|
@ -20,3 +20,4 @@ LL | m!('static);
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0224`.
|
||||
|
@ -12,3 +12,4 @@ LL | type _T1 = dyn _2;
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0224`.
|
||||
|
@ -14,4 +14,5 @@ LL | m!(dyn Copy + Send + 'static);
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0038`.
|
||||
Some errors have detailed explanations: E0038, E0224.
|
||||
For more information about an error, try `rustc --explain E0038`.
|
||||
|
@ -6,3 +6,4 @@ LL | dyn 'static +: 'static + Copy,
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0224`.
|
||||
|
@ -32,5 +32,5 @@ LL | let _: S<dyn 'static +, 'static>;
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0107, E0747.
|
||||
Some errors have detailed explanations: E0107, E0224, E0747.
|
||||
For more information about an error, try `rustc --explain E0107`.
|
||||
|
@ -12,3 +12,4 @@ LL | type _0 = dyn ?Sized;
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0224`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user