blob: 85e12463a903dca4f9964557282053d8174332e8 [file] [log] [blame] [edit]
struct A;
struct B;
static S: &'static B = &A;
//~^ ERROR cannot perform deref coercion
use std::ops::Deref;
impl Deref for A {
type Target = B;
fn deref(&self)->&B { static B_: B = B; &B_ }
}
fn main(){}