Sign in
fuchsia
/
third_party
/
rust
/
1e5ec0a12c73efdd9a492fdc7ab661d90dc5bcf5
/
.
/
tests
/
ui
/
static
/
static-region-bound.rs
blob: d70706e5764f636bd48ab1e9ea68cf9269f9276d [
file
] [
log
] [
blame
]
fn
id
<
T
>(
x
:
T
)
->
T
{
x
}
fn
f
<
T
:
'
static
>(
_
:
T
)
{}
fn
main
()
{
let
x
:
Box
<
_
>
=
Box
::
new
(
3
);
f
(
x
);
let
x
=
&
id
(
3
);
//~ ERROR temporary value dropped while borrowed
f
(
x
);
}