error[E0277]: the trait bound `S: Deref` is not satisfied --> $DIR/arbitrary_self_types_pin_needing_borrow.rs:10:14 | LL | Pin::new(S).x(); | -------- ^ the trait `Deref` is not implemented for `S` | | | required by a bound introduced by this call | note: required by a bound in `Pin::::new` --> $SRC_DIR/core/src/pin.rs:LL:COL help: consider borrowing here | LL | Pin::new(&S).x(); | + LL | Pin::new(&mut S).x(); | ++++ error[E0599]: no method named `x` found for struct `Pin` in the current scope --> $DIR/arbitrary_self_types_pin_needing_borrow.rs:10:17 | LL | Pin::new(S).x(); | ^ method not found in `Pin` | note: method is available for `Pin<&mut S>` --> $DIR/arbitrary_self_types_pin_needing_borrow.rs:5:5 | LL | fn x(self: Pin<&mut Self>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0599. For more information about an error, try `rustc --explain E0277`.