error[E0308]: mismatched types
╭▸ $DIR/E0308-clarification.rs:15:10
│
LL │ fn hide<T: Foo>(x: T) -> impl Foo {
│ ┬───────
│ │
│ the expected opaque type
│ the found opaque type
‡
LL │ x = (x.1, x.0);
│ ━━━ expected `u32`, found `i32`
│
├ note: expected opaque type `impl Foo` (`u32`)
│ found opaque type `impl Foo` (`i32`)
╰ note: distinct uses of `impl Trait` result in different opaque types
error[E0308]: mismatched types
╭▸ $DIR/E0308-clarification.rs:15:15
│
LL │ fn hide<T: Foo>(x: T) -> impl Foo {
│ ┬───────
│ │
│ the expected opaque type
│ the found opaque type
‡
LL │ x = (x.1, x.0);
│ ━━━ expected `i32`, found `u32`
│
├ note: expected opaque type `impl Foo` (`i32`)
│ found opaque type `impl Foo` (`u32`)
╰ note: distinct uses of `impl Trait` result in different opaque types
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.