Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
span
/
regions-close-over-borrowed-ref-in-obj.rs
blob: 16b4cc2586273f98f1fc0c8a67ecf4996b7cc052 [
file
] [
log
] [
blame
] [
edit
]
fn
id
<
T
>(
x
:
T
)
->
T
{
x
}
trait
Foo
{
}
impl
<
'a> Foo for &'
a isize
{
}
fn
main
()
{
let
blah
;
{
let
ss
:
&
isize
=
&
id
(
1
);
//~^ ERROR temporary value dropped while borrowed
blah
=
Box
::
new
(
ss
)
as
Box
<
dyn
Foo
>;
}
}