2018-02-27 16:03:23 -03:00
|
|
|
#![feature(nll)]
|
|
|
|
|
|
|
|
fn gimme(x: &(u32,)) -> &u32 {
|
|
|
|
&x.0
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = gimme({
|
|
|
|
let v = 22;
|
|
|
|
&(v,)
|
2018-09-25 16:06:28 +02:00
|
|
|
//~^ ERROR temporary value dropped while borrowed [E0716]
|
2018-02-27 16:03:23 -03:00
|
|
|
});
|
|
|
|
println!("{:?}", x);
|
|
|
|
}
|