let mut x = 22;
let p: &u32 = &x;
x += 1;
drop(p);
let p: &'a u32 = &'b x; // Loan L0
&'b u32 <: &'a u32 if
'b: 'a
let x = 22;
// x is live here
read(x);
// x is dead here, current value is overwritten
x = 44;
Context
let mut x = 22;
let p: &u32 = &x;
x += 1;
drop(p);
let mut x = 22;
let p: &'a u32 = &'b x; // Loan L0
x += 1;
drop(p);
&'b u32 <: &'a u32 if
'b: 'a
Concept: Live regions
let x = 22;
// x is live here
read(x);
// x is dead here, current value is overwritten
x = 44;
// x is live here