fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
789 B31 linesraw
1error: struct literals are not allowed here
2  --> $DIR/struct-literal-in-for.rs:12:14
3   |
4LL |       for x in Foo {
5   |  ______________^
6LL | |         x: 3
7LL | |     }.hi() {
8   | |_____^
9   |
10help: surround the struct literal with parentheses
11   |
12LL |     for x in (Foo {
13LL |         x: 3
14LL |     }).hi() {
15   |
16
17error[E0277]: `bool` is not an iterator
18  --> $DIR/struct-literal-in-for.rs:12:14
19   |
20LL |       for x in Foo {
21   |  ______________^
22LL | |         x: 3
23LL | |     }.hi() {
24   | |__________^ `bool` is not an iterator
25   |
26   = help: the trait `std::iter::Iterator` is not implemented for `bool`
27   = note: required by `std::iter::IntoIterator::into_iter`
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0277`.