blob: 0f6d34fad951f7919626e74b25b0b560f825207c [file] [log] [blame]
//@ edition:2024
use core::marker::PhantomPinned;
use core::pin::pin;
fn a() {
struct NotCopy<T>(T);
#[allow(unused_mut)]
let mut pointee = NotCopy(PhantomPinned);
pin!(pointee);
let _moved = pointee;
//~^ ERROR use of moved value
}
fn b() {
struct NotCopy<T>(T);
let mut pointee = NotCopy(PhantomPinned);
pin!(*&mut pointee);
//~^ ERROR cannot move
let _moved = pointee;
}
fn main() {
a();
b();
}