1 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
2 --> $DIR/equality2.rs:1:12
4 LL | #![feature(specialization)]
7 = note: `#[warn(incomplete_features)]` on by default
8 = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
9 = help: consider using `min_specialization` instead, which is more stable and complete
11 error[E0308]: mismatched types
12 --> $DIR/equality2.rs:25:18
14 LL | fn hide<T: Foo>(x: T) -> impl Foo {
15 | -------- the found opaque type
17 LL | let _: u32 = hide(0_u32);
18 | --- ^^^^^^^^^^^ expected `u32`, found opaque type
20 | expected due to this
22 = note: expected type `u32`
23 found opaque type `impl Foo`
25 error[E0308]: mismatched types
26 --> $DIR/equality2.rs:31:18
28 LL | fn hide<T: Foo>(x: T) -> impl Foo {
29 | -------- the found opaque type
31 LL | let _: i32 = Leak::leak(hide(0_i32));
32 | --- ^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found associated type
34 | expected due to this
36 = note: expected type `i32`
37 found associated type `<impl Foo as Leak>::T`
38 = help: consider constraining the associated type `<impl Foo as Leak>::T` to `i32`
39 = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
41 error[E0308]: mismatched types
42 --> $DIR/equality2.rs:38:10
44 LL | fn hide<T: Foo>(x: T) -> impl Foo {
47 | the expected opaque type
48 | the found opaque type
51 | ^^^ expected `u32`, found `i32`
53 = note: expected opaque type `impl Foo` (`u32`)
54 found opaque type `impl Foo` (`i32`)
56 error[E0308]: mismatched types
57 --> $DIR/equality2.rs:41:10
59 LL | fn hide<T: Foo>(x: T) -> impl Foo {
62 | the expected opaque type
63 | the found opaque type
66 | ^^^ expected `i32`, found `u32`
68 = note: expected opaque type `impl Foo` (`i32`)
69 found opaque type `impl Foo` (`u32`)
71 error: aborting due to 4 previous errors; 1 warning emitted
73 For more information about this error, try `rustc --explain E0308`.