2018-06-22 01:18:39 +00:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-50585.rs:2:18
|
2018-06-22 01:18:39 +00:00
|
|
|
|
|
|
|
|
LL | |y: Vec<[(); for x in 0..2 {}]>| {};
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^ expected `usize`, found `()`
|
2024-04-19 13:00:28 +00:00
|
|
|
|
|
|
|
|
= 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-22 01:18:39 +00:00
|
|
|
|
2024-11-22 02:31:42 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-06-22 01:18:39 +00:00
|
|
|
|
2024-11-22 02:31:42 +00:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|