test
超出范围后不应该消失吗?为什么println!
仍可以打印test
的值?
fn skip<'a>(line: &'a str, _prefix: &'a str) -> &'a str {
line
}
fn main() {
let line = "aaa";
let q;
{
let test = "bbb";
q = skip(test, line);
}
println!("{}", q);
}