]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0423.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / error-codes / E0423.rs
1 fn main () {
2     struct Foo { a: bool };
3
4     let f = Foo(); //~ ERROR E0423
5 }
6
7 fn bar() {
8     struct S { x: i32, y: i32 }
9     #[derive(PartialEq)]
10     struct T {}
11
12     if let S { x: _x, y: 2 } = S { x: 1, y: 2 } { println!("Ok"); }
13     //~^ ERROR E0423
14     //~|  expected type, found `1`
15     if T {} == T {} { println!("Ok"); }
16     //~^ ERROR E0423
17     //~| ERROR expected expression, found `==`
18 }
19
20 fn foo() {
21     for _ in std::ops::Range { start: 0, end: 10 } {}
22     //~^ ERROR E0423
23     //~| ERROR expected type, found `0`
24 }