Hello everyone,
I have the following code and it compiles, showing the lifetime of b, e
is same.
Can't figure out why.
Anybody help to make an explaination?
#[cfg(all())]
fn main() {
fn equal<'a, 'b, T>(s1: &'a mut T, s2: &'b mut T)
where
'a: 'b,
'b: 'a,
T: 'a,
{
}
let mut a = "1".to_owned();
{
let mut b: &mut String = &mut a;
{
let mut d = "2".to_owned();
{
let mut e: &mut String = &mut d;
equal(b, e);
}
}
b;
}
}