Why is not ok to return a local variable reference but a local reference is ok or a reference to a local reference is ok?
Not OK?
fn produce_ref<'a>() -> &'a i32 {
let v = 200;
&v
}
But this is...
fn produce_ref<'a>() -> &'a i32 {
let v = &200;
v
}
or this
fn produce_ref<'a>() -> &'a i32 {
let v = &200;
&v
}