]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-for.stderr
Rollup merge of #91699 - jsha:webkit-appearance-search-input, r=GuillaumeGomez
[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    |
10 help: surround the struct literal with parentheses
11    |
12 LL ~     for x in (Foo {
13 LL |         x: 3
14 LL ~     }).hi() {
15    |
16
17 error[E0277]: `bool` is not an iterator
18   --> $DIR/struct-literal-in-for.rs:12:14
19    |
20 LL |       for x in Foo {
21    |  ______________^
22 LL | |         x: 3
23 LL | |     }.hi() {
24    | |__________^ `bool` is not an iterator
25    |
26    = help: the trait `Iterator` is not implemented for `bool`
27    = note: required because of the requirements on the impl of `IntoIterator` for `bool`
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0277`.