summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-bounded-method-type-parameters.rs
blob: 56e750003dae9a132c18b98ba48c4e0515c63244 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Check that explicit region bounds are allowed on the various
// nominal types (but not on other types) and that they are type
// checked.

struct Foo;

impl Foo {
    fn some_method<A:'static>(self) { }
}

fn caller<'a>(x: &isize) {
    Foo.some_method::<&'a isize>();
    //~^ ERROR lifetime may not live long enough
}

fn main() { }