rust/tests/ui/parser/struct-literal-in-for.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
777 B
Plaintext
Raw Normal View History

error: struct literals are not allowed here
--> $DIR/struct-literal-in-for.rs:12:14
|
LL | for x in Foo {
| ______________^
LL | | x: 3
LL | | }.hi() {
| |_____^
|
2019-05-02 17:53:09 -05:00
help: surround the struct literal with parentheses
|
LL ~ for x in (Foo {
LL | x: 3
LL ~ }).hi() {
2018-10-20 15:36:17 -05:00
|
error[E0277]: `bool` is not an iterator
--> $DIR/struct-literal-in-for.rs:12:14
|
LL | for x in Foo {
| ______________^
LL | | x: 3
LL | | }.hi() {
| |__________^ `bool` is not an iterator
|
= help: the trait `Iterator` is not implemented for `bool`
= note: required for `bool` to implement `IntoIterator`
error: aborting due to 2 previous errors
2018-10-20 15:36:17 -05:00
For more information about this error, try `rustc --explain E0277`.