fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error: struct literals are not allowed here 2 --> $DIR/E0423.rs:12:32 3 | 4LL | if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); } 5 | ^^^^^^^^^^^^^^^^ 6 | 7help: surround the struct literal with parentheses 8 | 9LL | if let S { x: _x, y: 2 } = (S { x: 1, y: 2 }) { println!("Ok"); } 10 | ^ ^ 11 12error: expected expression, found `==` 13 --> $DIR/E0423.rs:14:13 14 | 15LL | if T {} == T {} { println!("Ok"); } 16 | ^^ expected expression 17 18error: struct literals are not allowed here 19 --> $DIR/E0423.rs:20:14 20 | 21LL | for _ in std::ops::Range { start: 0, end: 10 } {} 22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 23 | 24help: surround the struct literal with parentheses 25 | 26LL | for _ in (std::ops::Range { start: 0, end: 10 }) {} 27 | ^ ^ 28 29error[E0423]: expected function, tuple struct or tuple variant, found struct `Foo` 30 --> $DIR/E0423.rs:4:13 31 | 32LL | struct Foo { a: bool }; 33 | ---------------------- `Foo` defined here 34LL | 35LL | let f = Foo(); 36 | ^^^ 37 | | 38 | did you mean `Foo { /* fields */ }`? 39 | help: a function with a similar name exists (notice the capitalization): `foo` 40... 41LL | / fn foo() { 42LL | | for _ in std::ops::Range { start: 0, end: 10 } {} 43LL | | 44LL | | } 45 | |_- similarly named function `foo` defined here 46 47error[E0423]: expected value, found struct `T` 48 --> $DIR/E0423.rs:14:8 49 | 50LL | if T {} == T {} { println!("Ok"); } 51 | ^--- 52 | | 53 | help: surround the struct literal with parenthesis: `(T {})` 54 55error: aborting due to 5 previous errors 56 57For more information about this error, try `rustc --explain E0423`.