mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
13 lines
210 B
Rust
13 lines
210 B
Rust
fn gimme(x: &(u32,)) -> &u32 {
|
|
&x.0
|
|
}
|
|
|
|
fn main() {
|
|
let x = gimme({
|
|
let v = 22;
|
|
&(v,)
|
|
//~^ ERROR temporary value dropped while borrowed [E0716]
|
|
});
|
|
println!("{:?}", x);
|
|
}
|