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`
14 lines
436 B
Plaintext
14 lines
436 B
Plaintext
error[E0308]: mismatched types
|
|
--> $DIR/closure-in-array-len.rs:3:13
|
|
|
|
|
LL | fn([u8; |x: u8| {}]),
|
|
| ^^^^^^^^^^ expected `usize`, found closure
|
|
|
|
|
= note: expected type `usize`
|
|
found closure `{closure@$DIR/closure-in-array-len.rs:3:13: 3:20}`
|
|
= note: array length can only be `usize`
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|