error[E0308]: mismatched types --> $DIR/feature-gate-type_alias_impl_trait.rs:10:9 | LL | type Foo = impl Debug; | ---------- the expected opaque type ... LL | Bar(42) | ^^ expected opaque type, found integer | = note: expected opaque type `impl Debug` found type `{integer}` error[E0308]: mismatched types --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18 | LL | type Foo3 = impl Debug; | ---------- the found opaque type ... LL | let y: i32 = x; | --- ^ expected `i32`, found opaque type | | | expected due to this | = note: expected type `i32` found opaque type `impl Debug` error[E0308]: mismatched types --> $DIR/feature-gate-type_alias_impl_trait.rs:26:13 | LL | type Foo3 = impl Debug; | ---------- the expected opaque type ... LL | define3(42) | ^^ expected opaque type, found integer | = note: expected opaque type `impl Debug` found type `{integer}` error[E0308]: mismatched types --> $DIR/feature-gate-type_alias_impl_trait.rs:33:19 | LL | type Foo4 = impl Debug; | ---------- the expected opaque type ... LL | let y: Foo4 = 42; | ---- ^^ expected opaque type, found integer | | | expected due to this | = note: expected opaque type `impl Debug` found type `{integer}` error: could not find defining uses --> $DIR/feature-gate-type_alias_impl_trait.rs:5:12 | LL | type Foo = impl Debug; | ^^^^^^^^^^ error: could not find defining uses --> $DIR/feature-gate-type_alias_impl_trait.rs:19:13 | LL | type Foo3 = impl Debug; | ^^^^^^^^^^ error: could not find defining uses --> $DIR/feature-gate-type_alias_impl_trait.rs:29:13 | LL | type Foo4 = impl Debug; | ^^^^^^^^^^ error: aborting due to 7 previous errors For more information about this error, try `rustc --explain E0308`.