]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0423.stderr
5cb7121a0d1c38e0731fddfb569223922d8df9cd
[rust.git] / src / test / ui / error-codes / E0423.stderr
1 error: struct literals are not allowed here
2   --> $DIR/E0423.rs:12:32
3    |
4 LL |     if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
5    |                                ^^^^^^^^^^^^^^^^
6 help: surround the struct literal with parenthesis
7    |
8 LL |     if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); }
9    |                                ^                ^
10
11 error: expected expression, found `==`
12   --> $DIR/E0423.rs:14:13
13    |
14 LL |     if T {} == T {} { println!("Ok"); }
15    |             ^^ expected expression
16
17 error: struct literals are not allowed here
18   --> $DIR/E0423.rs:20:14
19    |
20 LL |     for _ in std::ops::Range { start: 0, end: 10 } {}
21    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 help: surround the struct literal with parenthesis
23    |
24 LL |     for _ in (std::ops::Range { start: 0, end: 10 }) {}
25    |              ^                                     ^
26
27 error[E0423]: expected function, found struct `Foo`
28   --> $DIR/E0423.rs:4:13
29    |
30 LL |     let f = Foo();
31    |             ^^^
32    |             |
33    |             did you mean `Foo { /* fields */ }`?
34    |             help: a function with a similar name exists: `foo`
35
36 error[E0423]: expected value, found struct `T`
37   --> $DIR/E0423.rs:14:8
38    |
39 LL |     if T {} == T {} { println!("Ok"); }
40    |        ^---
41    |        |
42    |        help: surround the struct literal with parenthesis: `(T {})`
43
44 error: aborting due to 5 previous errors
45
46 For more information about this error, try `rustc --explain E0423`.