rust/tests/ui/dyn-star/dyn-pointer-like.stderr

40 lines
1.2 KiB
Plaintext

error[E0277]: `dyn* PointerLike` needs to have the same ABI as a pointer
--> $DIR/dyn-pointer-like.rs:14:9
|
LL | foo(x);
| --- ^ the trait `PointerLike` is not implemented for `dyn* PointerLike`
| |
| required by a bound introduced by this call
|
= note: the trait bound `dyn* PointerLike: PointerLike` is not satisfied
note: required by a bound in `foo`
--> $DIR/dyn-pointer-like.rs:21:11
|
LL | fn foo<T: PointerLike + ?Sized>(x: T) {
| ^^^^^^^^^^^ required by this bound in `foo`
help: consider borrowing here
|
LL | foo(&x);
| +
LL | foo(&mut x);
| ++++
error[E0277]: `dyn PointerLike` needs to have the same ABI as a pointer
--> $DIR/dyn-pointer-like.rs:18:9
|
LL | foo(x);
| --- ^ `dyn PointerLike` needs to be a pointer-like type
| |
| required by a bound introduced by this call
|
= help: the trait `PointerLike` is not implemented for `dyn PointerLike`
note: required by a bound in `foo`
--> $DIR/dyn-pointer-like.rs:21:11
|
LL | fn foo<T: PointerLike + ?Sized>(x: T) {
| ^^^^^^^^^^^ required by this bound in `foo`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.