blob: 27c70a7b4dfaef2283910ade170e32c670650256 [file] [log] [blame] [edit]
#![feature(pin_ergonomics)]
#![allow(dead_code, incomplete_features)]
// make sure we can't accidentally reborrow Pin<&T> as Pin<&mut T>
use std::pin::Pin;
struct Foo;
fn foo(_: Pin<&mut Foo>) {
}
fn bar(x: Pin<&Foo>) {
foo(x); //~ ERROR mismatched types
//| ERROR types differ in mutability
}
fn main() {}