rust/tests/ui/regions/regions-addr-of-ret.rs
2023-01-11 09:32:08 +00:00

10 lines
128 B
Rust

// run-pass
fn f(x: &isize) -> &isize {
return &*x;
}
pub fn main() {
let three = &3;
println!("{}", *f(three));
}