|
| 1 | +error[E0503]: cannot use `self.cx` because it was mutably borrowed |
| 2 | + --> $DIR/two-phase-surprise-no-conflict.rs:21:23 |
| 3 | + | |
| 4 | +LL | let _mut_borrow = &mut *self; |
| 5 | + | ---------- borrow of `*self` occurs here |
| 6 | +LL | let _access = self.cx; |
| 7 | + | ^^^^^^^ use of borrowed `*self` |
| 8 | +LL | |
| 9 | +LL | _mut_borrow; |
| 10 | + | ----------- borrow later used here |
| 11 | + |
| 12 | +error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable |
| 13 | + --> $DIR/two-phase-surprise-no-conflict.rs:57:17 |
| 14 | + | |
| 15 | +LL | self.hash_expr(&self.cx_mut.body(eid).value); |
| 16 | + | ^^^^^---------^^-----------^^^^^^^^^^^^^^^^^ |
| 17 | + | | | | |
| 18 | + | | | immutable borrow occurs here |
| 19 | + | | immutable borrow later used by call |
| 20 | + | mutable borrow occurs here |
| 21 | + |
| 22 | +error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time |
| 23 | + --> $DIR/two-phase-surprise-no-conflict.rs:119:51 |
| 24 | + | |
| 25 | +LL | reg.register_static(Box::new(TrivialPass::new(&mut reg.sess_mut))); |
| 26 | + | --- --------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here |
| 27 | + | | | |
| 28 | + | | first borrow later used by call |
| 29 | + | first mutable borrow occurs here |
| 30 | + |
| 31 | +error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time |
| 32 | + --> $DIR/two-phase-surprise-no-conflict.rs:122:54 |
| 33 | + | |
| 34 | +LL | reg.register_bound(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); |
| 35 | + | --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here |
| 36 | + | | | |
| 37 | + | | first borrow later used by call |
| 38 | + | first mutable borrow occurs here |
| 39 | + |
| 40 | +error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time |
| 41 | + --> $DIR/two-phase-surprise-no-conflict.rs:125:53 |
| 42 | + | |
| 43 | +LL | reg.register_univ(Box::new(TrivialPass::new_mut(&mut reg.sess_mut))); |
| 44 | + | --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here |
| 45 | + | | | |
| 46 | + | | first borrow later used by call |
| 47 | + | first mutable borrow occurs here |
| 48 | + |
| 49 | +error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time |
| 50 | + --> $DIR/two-phase-surprise-no-conflict.rs:128:44 |
| 51 | + | |
| 52 | +LL | reg.register_ref(&TrivialPass::new_mut(&mut reg.sess_mut)); |
| 53 | + | --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here |
| 54 | + | | | |
| 55 | + | | first borrow later used by call |
| 56 | + | first mutable borrow occurs here |
| 57 | + |
| 58 | +error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable |
| 59 | + --> $DIR/two-phase-surprise-no-conflict.rs:138:5 |
| 60 | + | |
| 61 | +LL | reg.register_bound(Box::new(CapturePass::new(®.sess_mut))); |
| 62 | + | ^^^^--------------^^^^^^^^^^^^^^^^^^^^^^^^^^^-------------^^^ |
| 63 | + | | | | |
| 64 | + | | | immutable borrow occurs here |
| 65 | + | | immutable borrow later used by call |
| 66 | + | mutable borrow occurs here |
| 67 | + |
| 68 | +error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable |
| 69 | + --> $DIR/two-phase-surprise-no-conflict.rs:141:5 |
| 70 | + | |
| 71 | +LL | reg.register_univ(Box::new(CapturePass::new(®.sess_mut))); |
| 72 | + | ^^^^-------------^^^^^^^^^^^^^^^^^^^^^^^^^^^-------------^^^ |
| 73 | + | | | | |
| 74 | + | | | immutable borrow occurs here |
| 75 | + | | immutable borrow later used by call |
| 76 | + | mutable borrow occurs here |
| 77 | + |
| 78 | +error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable |
| 79 | + --> $DIR/two-phase-surprise-no-conflict.rs:144:5 |
| 80 | + | |
| 81 | +LL | reg.register_ref(&CapturePass::new(®.sess_mut)); |
| 82 | + | ^^^^------------^^^^^^^^^^^^^^^^^^^-------------^^ |
| 83 | + | | | | |
| 84 | + | | | immutable borrow occurs here |
| 85 | + | | immutable borrow later used by call |
| 86 | + | mutable borrow occurs here |
| 87 | + |
| 88 | +error[E0499]: cannot borrow `*reg` as mutable more than once at a time |
| 89 | + --> $DIR/two-phase-surprise-no-conflict.rs:154:5 |
| 90 | + | |
| 91 | +LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); |
| 92 | + | ^^^^--------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------^^^ |
| 93 | + | | | | |
| 94 | + | | | first mutable borrow occurs here |
| 95 | + | | first borrow later used by call |
| 96 | + | second mutable borrow occurs here |
| 97 | + |
| 98 | +error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time |
| 99 | + --> $DIR/two-phase-surprise-no-conflict.rs:154:54 |
| 100 | + | |
| 101 | +LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); |
| 102 | + | --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here |
| 103 | + | | | |
| 104 | + | | first borrow later used by call |
| 105 | + | first mutable borrow occurs here |
| 106 | + |
| 107 | +error[E0499]: cannot borrow `*reg` as mutable more than once at a time |
| 108 | + --> $DIR/two-phase-surprise-no-conflict.rs:158:5 |
| 109 | + | |
| 110 | +LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); |
| 111 | + | ^^^^-------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------^^^ |
| 112 | + | | | | |
| 113 | + | | | first mutable borrow occurs here |
| 114 | + | | first borrow later used by call |
| 115 | + | second mutable borrow occurs here |
| 116 | + |
| 117 | +error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time |
| 118 | + --> $DIR/two-phase-surprise-no-conflict.rs:158:53 |
| 119 | + | |
| 120 | +LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut))); |
| 121 | + | --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here |
| 122 | + | | | |
| 123 | + | | first borrow later used by call |
| 124 | + | first mutable borrow occurs here |
| 125 | + |
| 126 | +error[E0499]: cannot borrow `*reg` as mutable more than once at a time |
| 127 | + --> $DIR/two-phase-surprise-no-conflict.rs:162:5 |
| 128 | + | |
| 129 | +LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); |
| 130 | + | ^^^^------------^^^^^^^^^^^^^^^^^^^^^^^-----------------^^ |
| 131 | + | | | | |
| 132 | + | | | first mutable borrow occurs here |
| 133 | + | | first borrow later used by call |
| 134 | + | second mutable borrow occurs here |
| 135 | + |
| 136 | +error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time |
| 137 | + --> $DIR/two-phase-surprise-no-conflict.rs:162:44 |
| 138 | + | |
| 139 | +LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut)); |
| 140 | + | --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here |
| 141 | + | | | |
| 142 | + | | first borrow later used by call |
| 143 | + | first mutable borrow occurs here |
| 144 | + |
| 145 | +error: aborting due to 15 previous errors |
| 146 | + |
| 147 | +Some errors have detailed explanations: E0499, E0502, E0503. |
| 148 | +For more information about an error, try `rustc --explain E0499`. |
0 commit comments