summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-25901.rs
blob: 1f7b341a97efc7d6087c859481cc62b408dd3579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
struct A;
struct B;

static S: &'static B = &A;
//~^ ERROR the trait bound

use std::ops::Deref;

impl Deref for A {
    type Target = B;
    fn deref(&self)->&B { static B_: B = B; &B_ }
}

fn main(){}