Sign in
rust
/
rust-lang
/
rust
/
refs/heads/try
/
.
/
tests
/
ui
/
codegen
/
rvalue-mut-ref-box-drop.rs
blob: 441820ad64e4315de2eaf7eee7d3de7ef7d31dc0 [
file
] [
log
] [
blame
]
//! Tests cleanup of a temporary `Box` rvalue passed as a mutable reference.
//!
//! - Issue: <https://github.com/rust-lang/rust/issues/7972>.
//@ run-pass
fn
foo
(
x
:
&
mut
Box
<
u8
>)
{
*
x
=
Box
::
new
(
5
);
}
pub
fn
main
()
{
foo
(&
mut
Box
::
new
(
4
));
}