|
| 1 | +error: concrete type differs from previous defining opaque type use |
| 2 | + --> $DIR/normalize-hidden-types.rs:25:20 |
| 3 | + | |
| 4 | +LL | fn define() -> Opaque { |
| 5 | + | ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)` |
| 6 | + | |
| 7 | +note: previous use here |
| 8 | + --> $DIR/normalize-hidden-types.rs:27:9 |
| 9 | + | |
| 10 | +LL | dyn_hoops::<_>(0) |
| 11 | + | ^^^^^^^^^^^^^^^^^ |
| 12 | + |
| 13 | +error: concrete type differs from previous defining opaque type use |
| 14 | + --> $DIR/normalize-hidden-types.rs:34:22 |
| 15 | + | |
| 16 | +LL | fn define_1() -> Opaque { dyn_hoops::<_>(0) } |
| 17 | + | ^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)` |
| 18 | + | |
| 19 | +note: previous use here |
| 20 | + --> $DIR/normalize-hidden-types.rs:34:31 |
| 21 | + | |
| 22 | +LL | fn define_1() -> Opaque { dyn_hoops::<_>(0) } |
| 23 | + | ^^^^^^^^^^^^^^^^^ |
| 24 | + |
| 25 | +error[E0308]: mismatched types |
| 26 | + --> $DIR/normalize-hidden-types.rs:44:25 |
| 27 | + | |
| 28 | +LL | type Opaque = impl Sized; |
| 29 | + | ---------- the expected opaque type |
| 30 | +... |
| 31 | +LL | let _: Opaque = dyn_hoops::<u8>(0); |
| 32 | + | ------ ^^^^^^^^^^^^^^^^^^ expected opaque type, found `*const dyn FnOnce(())` |
| 33 | + | | |
| 34 | + | expected due to this |
| 35 | + | |
| 36 | + = note: expected opaque type `typeck::Opaque` |
| 37 | + found raw pointer `*const (dyn FnOnce(()) + 'static)` |
| 38 | + = help: consider constraining the associated type `<u8 as Trait>::Gat<'_>` to `()` or calling a method that returns `<u8 as Trait>::Gat<'_>` |
| 39 | + = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
| 40 | + |
| 41 | +error: concrete type differs from previous defining opaque type use |
| 42 | + --> $DIR/normalize-hidden-types.rs:54:25 |
| 43 | + | |
| 44 | +LL | let _: Opaque = dyn_hoops::<_>(0); |
| 45 | + | ^^^^^^^^^^^^^^^^^ expected `*const (dyn FnOnce(()) + 'static)`, got `*const dyn for<'a> FnOnce(<u8 as Trait>::Gat<'a>)` |
| 46 | + | |
| 47 | +note: previous use here |
| 48 | + --> $DIR/normalize-hidden-types.rs:56:9 |
| 49 | + | |
| 50 | +LL | None |
| 51 | + | ^^^^ |
| 52 | + |
| 53 | +error: aborting due to 4 previous errors |
| 54 | + |
| 55 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments