2021-07-29 16:15:53 -05:00
|
|
|
error[E0658]: `for` is not allowed in a `const`
|
2019-11-06 14:29:30 -06:00
|
|
|
--> $DIR/issue-50582.rs:2:20
|
|
|
|
|
|
|
|
|
LL | Vec::<[(); 1 + for x in 0..1 {}]>::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2021-07-29 16:15:53 -05:00
|
|
|
|
|
|
|
|
= note: see issue #87575 <https://github.com/rust-lang/rust/issues/87575> for more information
|
|
|
|
= help: add `#![feature(const_for)]` to the crate attributes to enable
|
2019-11-06 14:29:30 -06:00
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
error[E0277]: cannot add `()` to `{integer}`
|
2019-03-04 15:28:31 -06:00
|
|
|
--> $DIR/issue-50582.rs:2:18
|
|
|
|
|
|
|
|
|
LL | Vec::<[(); 1 + for x in 0..1 {}]>::new();
|
|
|
|
| ^ no implementation for `{integer} + ()`
|
|
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
= help: the trait `Add<()>` is not implemented for `{integer}`
|
2022-03-26 21:02:07 -05:00
|
|
|
= help: the following other types implement trait `Add<Rhs>`:
|
2023-06-27 18:31:06 -05:00
|
|
|
<isize as Add>
|
|
|
|
<isize as Add<&isize>>
|
|
|
|
<i8 as Add>
|
|
|
|
<i8 as Add<&i8>>
|
|
|
|
<i16 as Add>
|
|
|
|
<i16 as Add<&i16>>
|
|
|
|
<i32 as Add>
|
|
|
|
<i32 as Add<&i32>>
|
2021-12-13 14:56:40 -06:00
|
|
|
and 48 others
|
2019-03-04 15:28:31 -06:00
|
|
|
|
2022-09-10 02:07:49 -05:00
|
|
|
error: aborting due to 2 previous errors
|
2019-03-04 15:28:31 -06:00
|
|
|
|
2021-07-29 16:15:53 -05:00
|
|
|
Some errors have detailed explanations: E0277, E0658.
|
2019-11-06 14:29:30 -06:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|