]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-for.stderr
Rollup merge of #59825 - jsgf:from-ref-string, r=sfackler
[rust.git] / src / test / ui / parser / struct-literal-in-for.stderr
1 error: struct literals are not allowed here
2   --> $DIR/struct-literal-in-for.rs:12:14
3    |
4 LL |       for x in Foo {
5    |  ______________^
6 LL | |         x: 3
7 LL | |     }.hi() {
8    | |_____^
9 help: surround the struct literal with parentheses
10    |
11 LL |     for x in (Foo {
12 LL |         x: 3
13 LL |     }).hi() {
14    |
15
16 error[E0277]: `bool` is not an iterator
17   --> $DIR/struct-literal-in-for.rs:12:14
18    |
19 LL |       for x in Foo {
20    |  ______________^
21 LL | |         x: 3
22 LL | |     }.hi() {
23    | |__________^ `bool` is not an iterator
24    |
25    = help: the trait `std::iter::Iterator` is not implemented for `bool`
26    = note: required by `std::iter::IntoIterator::into_iter`
27
28 error: aborting due to 2 previous errors
29
30 For more information about this error, try `rustc --explain E0277`.