|
| 1 | +error[E0271]: type mismatch resolving `<T as Pointee>::Metadata == ()` |
| 2 | + --> $DIR/pointee-tail-is-generic-errors.rs:13:5 |
| 3 | + | |
| 4 | +LL | is_thin::<T>(); |
| 5 | + | ^^^^^^^^^^^^ expected `()`, found associated type |
| 6 | + | |
| 7 | + = note: expected unit type `()` |
| 8 | + found associated type `<T as Pointee>::Metadata` |
| 9 | + = help: consider constraining the associated type `<T as Pointee>::Metadata` to `()` |
| 10 | + = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html |
| 11 | +note: required by a bound in `is_thin` |
| 12 | + --> $DIR/pointee-tail-is-generic-errors.rs:20:33 |
| 13 | + | |
| 14 | +LL | fn is_thin<T: std::ptr::Pointee<Metadata = ()> + ?Sized>() {} |
| 15 | + | ^^^^^^^^^^^^^ required by this bound in `is_thin` |
| 16 | + |
| 17 | +error[E0271]: type mismatch resolving `<impl Debug + ?Sized as Pointee>::Metadata == ()` |
| 18 | + --> $DIR/pointee-tail-is-generic-errors.rs:16:5 |
| 19 | + | |
| 20 | +LL | type Opaque = impl std::fmt::Debug + ?Sized; |
| 21 | + | ----------------------------- the found opaque type |
| 22 | +... |
| 23 | +LL | is_thin::<Opaque>(); |
| 24 | + | ^^^^^^^^^^^^^^^^^ expected `()`, found associated type |
| 25 | + | |
| 26 | + = note: expected unit type `()` |
| 27 | + found associated type `<impl Debug + ?Sized as Pointee>::Metadata` |
| 28 | +note: required by a bound in `is_thin` |
| 29 | + --> $DIR/pointee-tail-is-generic-errors.rs:20:33 |
| 30 | + | |
| 31 | +LL | fn is_thin<T: std::ptr::Pointee<Metadata = ()> + ?Sized>() {} |
| 32 | + | ^^^^^^^^^^^^^ required by this bound in `is_thin` |
| 33 | +help: consider constraining the associated type `<impl Debug + ?Sized as Pointee>::Metadata` to `()` |
| 34 | + | |
| 35 | +LL | type Opaque = impl std::fmt::Debug<Metadata = ()> + ?Sized; |
| 36 | + | +++++++++++++++ |
| 37 | + |
| 38 | +error: aborting due to 2 previous errors |
| 39 | + |
| 40 | +For more information about this error, try `rustc --explain E0271`. |
0 commit comments