rust/tests/ui/reborrow/pin_mut_coerce_shared.rs
2025-09-27 01:11:01 +03:00

13 lines
322 B
Rust

use std::pin::Pin;
fn method(a: Pin<&()>) {} //~NOTE function defined here
fn main() {
let a = &mut ();
let a = Pin::new(a);
method(a);
//~^ ERROR mismatched types
//~| NOTE arguments to this function are incorrect
//~| NOTE types differ in mutability
//~| NOTE expected struct `Pin<&()>`
}