mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +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`
29 lines
821 B
Plaintext
29 lines
821 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/issue-61882.rs:4:27
|
|
|
|
|
LL | const B: A<u8> = Self(0);
|
|
| ---- ^ expected `bool`, found integer
|
|
| |
|
|
| arguments to this function are incorrect
|
|
|
|
|
note: tuple struct defined here
|
|
--> $DIR/issue-61882.rs:1:8
|
|
|
|
|
LL | struct A<T>(T);
|
|
| ^
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/issue-61882.rs:4:22
|
|
|
|
|
LL | const B: A<u8> = Self(0);
|
|
| ----- ^^^^^^^ expected `A<u8>`, found `A<bool>`
|
|
| |
|
|
| expected because of the type of the associated constant
|
|
|
|
|
= note: expected struct `A<u8>`
|
|
found struct `A<bool>`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|