Sign in
rust
/
rust-lang
/
rust
/
1b01decc1ca851e014b6951bdd7f2ac2f897adc9
/
.
/
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]
}