blob: 726f076b183bd8f34a97a789a927925c7b2a360b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
error[E0308]: mismatched types
--> $DIR/broken-deref-chain.rs:41:30
|
LL | fn trait_method() -> impl Trait {
| ---------- the found opaque type
...
LL | x.trait_method();
| - here the type of `x` is inferred to be `Foo<u32, impl Trait>`
LL | let _: Foo<i32, _> = x; // Test that we did not apply the deref step
| ----------- ^ expected `Foo<i32, _>`, found `Foo<u32, impl Trait>`
| |
| expected due to this
|
= note: expected struct `Foo<i32, _>`
found struct `Foo<u32, impl Trait>`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.
|