Sign in
fuchsia
/
third_party
/
rust
/
08351004125c4d49aa757f2c3ec2340f7469ea91
/
.
/
src
/
test
/
ui
/
static
/
static-region-bound.rs
blob: f133133b3365038fbafbd29a56a45544aa05473e [
file
] [
log
] [
blame
]
#![
feature
(
box_syntax
)]
fn
id
<
T
>(
x
:
T
)
->
T
{
x
}
fn
f
<
T
:
'
static
>(
_
:
T
)
{}
fn
main
()
{
let
x
:
Box
<
_
>
=
box
3
;
f
(
x
);
let
x
=
&
id
(
3
);
//~ ERROR temporary value dropped while borrowed
f
(
x
);
}