fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.2 KiB41 linesraw
1error[E0308]: mismatched types
2  --> $DIR/equality2.rs:25:18
3   |
4LL |     let _: u32 = hide(0_u32);
5   |                  ^^^^^^^^^^^ expected u32, found opaque type
6   |
7   = note: expected type `u32`
8              found type `impl Foo`
9
10error[E0308]: mismatched types
11  --> $DIR/equality2.rs:31:18
12   |
13LL |     let _: i32 = Leak::leak(hide(0_i32));
14   |                  ^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found associated type
15   |
16   = note: expected type `i32`
17              found type `<impl Foo as Leak>::T`
18   = note: consider constraining the associated type `<impl Foo as Leak>::T` to `i32`
19   = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
20
21error[E0308]: mismatched types
22  --> $DIR/equality2.rs:38:10
23   |
24LL |     x = (x.1,
25   |          ^^^ expected u32, found i32
26   |
27   = note: expected type `impl Foo` (u32)
28              found type `impl Foo` (i32)
29
30error[E0308]: mismatched types
31  --> $DIR/equality2.rs:41:10
32   |
33LL |          x.0);
34   |          ^^^ expected i32, found u32
35   |
36   = note: expected type `impl Foo` (i32)
37              found type `impl Foo` (u32)
38
39error: aborting due to 4 previous errors
40
41For more information about this error, try `rustc --explain E0308`.