mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
87d8f5885b
- On `const` and `static` point at the type (like we do for let bindings) - On fn calls, point at const parameter in fn definition - On type, point at const parameter in type definition - On array type lengths, explain that array length is always `usize` - On enum variant discriminant, mention `repr`
21 lines
679 B
Plaintext
21 lines
679 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/issue-31910.rs:4:9
|
|
|
|
|
LL | X = Trait::Number,
|
|
| ^^^^^^^^^^^^^ expected `isize`, found `i32`
|
|
|
|
|
= note: enum variant discriminant can only be of a primitive type compatible with the enum's `repr`
|
|
|
|
error[E0392]: type parameter `T` is never used
|
|
--> $DIR/issue-31910.rs:1:11
|
|
|
|
|
LL | enum Enum<T: Trait> {
|
|
| ^ unused type parameter
|
|
|
|
|
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0308, E0392.
|
|
For more information about an error, try `rustc --explain E0308`.
|