rust/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
135 B
Rust
Raw Normal View History

2017-08-05 17:39:43 -05:00
struct Ref<'a, 'b> { a: &'a u32, b: &'b u32 }
fn foo(mut x: Ref, y: &u32) {
2017-11-20 06:13:27 -06:00
y = x.b; //~ ERROR lifetime mismatch
}
2017-08-05 17:39:43 -05:00
fn main() { }