|
| 1 | +error[E0308]: mismatched types |
| 2 | + --> $DIR/type_of_a_let.rs:12:18 |
| 3 | + | |
| 4 | +LL | type Foo = impl Debug; |
| 5 | + | ---------- the expected opaque type |
| 6 | +... |
| 7 | +LL | let x: Foo = 22_u32; |
| 8 | + | --- ^^^^^^ expected opaque type, found `u32` |
| 9 | + | | |
| 10 | + | expected due to this |
| 11 | + | |
| 12 | + = note: expected opaque type `impl Debug` |
| 13 | + found type `u32` |
| 14 | + |
| 15 | +error[E0308]: mismatched types |
| 16 | + --> $DIR/type_of_a_let.rs:14:5 |
| 17 | + | |
| 18 | +LL | type Foo = impl Debug; |
| 19 | + | ---------- the found opaque type |
| 20 | +... |
| 21 | +LL | fn foo1() -> u32 { |
| 22 | + | --- expected `u32` because of return type |
| 23 | +... |
| 24 | +LL | x |
| 25 | + | ^ expected `u32`, found opaque type |
| 26 | + | |
| 27 | + = note: expected type `u32` |
| 28 | + found opaque type `impl Debug` |
| 29 | + |
| 30 | +error[E0308]: mismatched types |
| 31 | + --> $DIR/type_of_a_let.rs:19:18 |
| 32 | + | |
| 33 | +LL | type Foo = impl Debug; |
| 34 | + | ---------- the expected opaque type |
| 35 | +... |
| 36 | +LL | let x: Foo = 22_u32; |
| 37 | + | --- ^^^^^^ expected opaque type, found `u32` |
| 38 | + | | |
| 39 | + | expected due to this |
| 40 | + | |
| 41 | + = note: expected opaque type `impl Debug` |
| 42 | + found type `u32` |
| 43 | + |
| 44 | +error[E0308]: mismatched types |
| 45 | + --> $DIR/type_of_a_let.rs:23:5 |
| 46 | + | |
| 47 | +LL | type Foo = impl Debug; |
| 48 | + | ---------- the found opaque type |
| 49 | +... |
| 50 | +LL | fn foo2() -> u32 { |
| 51 | + | --- expected `u32` because of return type |
| 52 | +... |
| 53 | +LL | y |
| 54 | + | ^ expected `u32`, found opaque type |
| 55 | + | |
| 56 | + = note: expected type `u32` |
| 57 | + found opaque type `impl Debug` |
| 58 | + |
| 59 | +error: could not find defining uses |
| 60 | + --> $DIR/type_of_a_let.rs:8:12 |
| 61 | + | |
| 62 | +LL | type Foo = impl Debug; |
| 63 | + | ^^^^^^^^^^ |
| 64 | + |
| 65 | +error: aborting due to 5 previous errors |
| 66 | + |
| 67 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments