summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs
blob: 3ffd7be4e73fe9a03a8679d7a1ff61cc8f21f303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
struct Foo {
  field: i32
}

impl Foo {
  fn foo<'a>(&self, x: &i32) -> &i32 {
    x
    //~^ ERROR lifetime may not live long enough
  }
}

fn main() { }