Sign in
android
/
toolchain
/
rustc
/
5139364148b53d79de1b5e778004d41a6a33a4a2
/
.
/
tests
/
ui
/
borrowck
/
borrowck-borrow-immut-deref-of-box-as-mut.rs
blob: 6b5544a8a396ba5d9aca5ef46313d04e3b0e5c12 [
file
] [
log
] [
blame
]
struct
A
;
impl
A
{
fn
foo
(&
mut
self
)
{
}
}
pub
fn
main
()
{
let
a
:
Box
<
_
>
=
Box
::
new
(
A
);
a
.
foo
();
//~^ ERROR cannot borrow `*a` as mutable, as `a` is not declared as mutable [E0596]
}