2022-03-04 00:04:23 -06:00
|
|
|
error[E0271]: type mismatch resolving `<T as Pointee>::Metadata == ()`
|
2022-08-13 02:14:54 -05:00
|
|
|
--> $DIR/pointee-tail-is-generic-errors.rs:13:15
|
2022-03-04 00:04:23 -06:00
|
|
|
|
|
|
|
|
LL | is_thin::<T>();
|
2022-08-13 02:14:54 -05:00
|
|
|
| ^ expected `()`, found associated type
|
2022-03-04 00:04:23 -06:00
|
|
|
|
|
|
|
|
= note: expected unit type `()`
|
|
|
|
found associated type `<T as Pointee>::Metadata`
|
|
|
|
= help: consider constraining the associated type `<T as Pointee>::Metadata` to `()`
|
|
|
|
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
|
|
|
|
note: required by a bound in `is_thin`
|
|
|
|
--> $DIR/pointee-tail-is-generic-errors.rs:20:33
|
|
|
|
|
|
|
|
|
LL | fn is_thin<T: std::ptr::Pointee<Metadata = ()> + ?Sized>() {}
|
|
|
|
| ^^^^^^^^^^^^^ required by this bound in `is_thin`
|
|
|
|
|
2022-02-14 10:10:22 -06:00
|
|
|
error[E0271]: type mismatch resolving `<Opaque as Pointee>::Metadata == ()`
|
2022-08-13 02:14:54 -05:00
|
|
|
--> $DIR/pointee-tail-is-generic-errors.rs:16:15
|
2022-03-04 00:04:23 -06:00
|
|
|
|
|
|
|
|
LL | type Opaque = impl std::fmt::Debug + ?Sized;
|
|
|
|
| ----------------------------- the found opaque type
|
|
|
|
...
|
|
|
|
LL | is_thin::<Opaque>();
|
2022-08-13 02:14:54 -05:00
|
|
|
| ^^^^^^ expected `()`, found associated type
|
2022-03-04 00:04:23 -06:00
|
|
|
|
|
|
|
|
= note: expected unit type `()`
|
2022-02-14 10:10:22 -06:00
|
|
|
found associated type `<Opaque as Pointee>::Metadata`
|
2022-03-04 00:04:23 -06:00
|
|
|
note: required by a bound in `is_thin`
|
|
|
|
--> $DIR/pointee-tail-is-generic-errors.rs:20:33
|
|
|
|
|
|
|
|
|
LL | fn is_thin<T: std::ptr::Pointee<Metadata = ()> + ?Sized>() {}
|
|
|
|
| ^^^^^^^^^^^^^ required by this bound in `is_thin`
|
2022-02-14 10:10:22 -06:00
|
|
|
help: consider constraining the associated type `<Opaque as Pointee>::Metadata` to `()`
|
2022-03-04 00:04:23 -06:00
|
|
|
|
|
|
|
|
LL | type Opaque = impl std::fmt::Debug<Metadata = ()> + ?Sized;
|
|
|
|
| +++++++++++++++
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0271`.
|