18 lines
656 B
Text
18 lines
656 B
Text
error[E0277]: `&T` needs to have the same ABI as a pointer
|
|
--> $DIR/check-size-at-cast-polymorphic-bad.rs:15:15
|
|
|
|
|
LL | fn polymorphic<T: Debug + ?Sized>(t: &T) {
|
|
| - this type parameter needs to be `Sized`
|
|
LL | dyn_debug(t);
|
|
| ^ `&T` needs to be a pointer-like type
|
|
|
|
|
= note: required for `&T` to implement `PointerLike`
|
|
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
|
|
|
|
LL - fn polymorphic<T: Debug + ?Sized>(t: &T) {
|
|
LL + fn polymorphic<T: Debug>(t: &T) {
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|