mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +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`
17 lines
518 B
Plaintext
17 lines
518 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/macro-brackets.rs:11:21
|
|
|
|
|
LL | id![static X: u32 = 'a';];
|
|
| --- ^^^ expected `u32`, found `char`
|
|
| |
|
|
| expected because of the type of the static
|
|
|
|
|
help: you can cast a `char` to a `u32`, since a `char` always occupies 4 bytes
|
|
|
|
|
LL | id![static X: u32 = 'a' as u32;];
|
|
| ++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|