rust/tests/ui/dyn-star/check-size-at-cast-polymorphic-bad.current.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
656 B
Plaintext
Raw Normal View History

error[E0277]: `&T` needs to have the same ABI as a pointer
--> $DIR/check-size-at-cast-polymorphic-bad.rs:15:15
|
2024-11-20 02:46:56 +00:00
LL | fn polymorphic<T: Debug + ?Sized>(t: &T) {
| - this type parameter needs to be `Sized`
LL | dyn_debug(t);
2023-02-07 18:02:20 +00:00
| ^ `&T` needs to be a pointer-like type
|
2024-11-20 02:46:56 +00:00
= 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`.