]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-borrow-immut-deref-of-box-as-mut.rs
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[rust.git] / src / test / ui / borrowck / borrowck-borrow-immut-deref-of-box-as-mut.rs
1 #![feature(box_syntax)]
2
3 struct A;
4
5 impl A {
6     fn foo(&mut self) {
7     }
8 }
9
10 pub fn main() {
11     let a: Box<_> = box A;
12     a.foo();
13     //~^ ERROR cannot borrow `*a` as mutable, as `a` is not declared as mutable [E0596]
14 }