2018-06-21 18:18:39 -07:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/issue-50585.rs:2:18
|
2018-06-21 18:18:39 -07:00
|
|
|
|
|
|
|
|
|
LL | |y: Vec<[(); for x in 0..2 {}]>| {};
|
2019-11-15 09:37:01 -08:00
|
|
|
| ^^^^^^^^^^^^^^^^ expected `usize`, found `()`
|
2024-04-19 18:30:28 +05:30
|
|
|
|
|
|
|
|
|
= note: `for` loops evaluate to unit type `()`
|
|
|
|
|
help: consider returning a value here
|
|
|
|
|
|
|
|
|
|
|
LL | |y: Vec<[(); for x in 0..2 {} /* `usize` value */]>| {};
|
|
|
|
|
| +++++++++++++++++++
|
2018-06-21 18:18:39 -07:00
|
|
|
|
2024-11-22 02:31:42 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-06-21 18:18:39 -07:00
|
|
|
|
2024-11-22 02:31:42 +00:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|