]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs
Rollup merge of #105555 - krasimirgg:llvm-int-opt-2, r=cuviper
[rust.git] / src / test / ui / lifetimes / lifetime-errors / ex3-both-anon-regions-one-is-struct-4.rs
1 struct Ref<'a, 'b> { a: &'a u32, b: &'b u32 }
2
3 fn foo(mut y: Ref, x: &u32) {
4     y.b = x;
5     //~^ ERROR lifetime may not live long enough
6 }
7
8 fn main() { }