summaryrefslogtreecommitdiffstats
path: root/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs
blob: 6fc570b9b5b9b51af0e4f6aef4e08b506487a931 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-pass
#![allow(non_upper_case_globals)]

// pretty-expanded FIXME #23616

trait TheTrait { fn dummy(&self) { } }

impl TheTrait for &'static isize { }

fn foo<'a,T>(_: &'a T) where &'a T : TheTrait { }

fn bar<T>(_: &'static T) where &'static T : TheTrait { }

fn main() {
    static x: isize = 1;
    foo(&x);
    bar(&x);
}