fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes 2 --> $DIR/equality2.rs:1:12 3 | 4LL | #![feature(specialization)] 5 | ^^^^^^^^^^^^^^ 6 | 7 = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information 8 = help: consider using `min_specialization` instead, which is more stable and complete 9 = note: `#[warn(incomplete_features)]` on by default 10 11error[E0308]: mismatched types 12 --> $DIR/equality2.rs:25:18 13 | 14LL | fn hide<T: Foo>(x: T) -> impl Foo { 15 | -------- the found opaque type 16... 17LL | let _: u32 = hide(0_u32); 18 | --- ^^^^^^^^^^^ expected `u32`, found opaque type 19 | | 20 | expected due to this 21 | 22 = note: expected type `u32` 23 found opaque type `impl Foo` 24 25error[E0308]: mismatched types 26 --> $DIR/equality2.rs:31:18 27 | 28LL | fn hide<T: Foo>(x: T) -> impl Foo { 29 | -------- the found opaque type 30... 31LL | let _: i32 = Leak::leak(hide(0_i32)); 32 | --- ^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found associated type 33 | | 34 | expected due to this 35 | 36 = note: expected type `i32` 37 found associated type `<impl Foo as Leak>::T` 38help: consider constraining the associated type `<impl Foo as Leak>::T` to `i32` 39 | 40LL | fn hide<T: Foo>(x: T) -> impl Foo<T = i32> { 41 | +++++++++ 42 43error[E0308]: mismatched types 44 --> $DIR/equality2.rs:38:10 45 | 46LL | fn hide<T: Foo>(x: T) -> impl Foo { 47 | -------- 48 | | 49 | the expected opaque type 50 | the found opaque type 51... 52LL | x = (x.1, 53 | ^^^ expected `u32`, found `i32` 54 | 55 = note: expected opaque type `impl Foo` (`u32`) 56 found opaque type `impl Foo` (`i32`) 57 = note: distinct uses of `impl Trait` result in different opaque types 58 59error[E0308]: mismatched types 60 --> $DIR/equality2.rs:41:10 61 | 62LL | fn hide<T: Foo>(x: T) -> impl Foo { 63 | -------- 64 | | 65 | the expected opaque type 66 | the found opaque type 67... 68LL | x.0); 69 | ^^^ expected `i32`, found `u32` 70 | 71 = note: expected opaque type `impl Foo` (`i32`) 72 found opaque type `impl Foo` (`u32`) 73 = note: distinct uses of `impl Trait` result in different opaque types 74 75error: aborting due to 4 previous errors; 1 warning emitted 76 77For more information about this error, try `rustc --explain E0308`.