2018-09-04 09:22:22 -05:00
|
|
|
error[E0503]: cannot use `self.cx` because it was mutably borrowed
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:21:23
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | let _mut_borrow = &mut *self;
|
2023-01-14 21:06:44 -06:00
|
|
|
| ---------- `*self` is borrowed here
|
2018-09-04 09:22:22 -05:00
|
|
|
LL | let _access = self.cx;
|
|
|
|
| ^^^^^^^ use of borrowed `*self`
|
2019-04-22 02:40:08 -05:00
|
|
|
LL |
|
2018-09-04 09:22:22 -05:00
|
|
|
LL | _mut_borrow;
|
|
|
|
| ----------- borrow later used here
|
|
|
|
|
|
|
|
error[E0502]: cannot borrow `*self` as mutable because it is also borrowed as immutable
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:57:17
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | self.hash_expr(&self.cx_mut.body(eid).value);
|
2023-06-22 15:30:23 -05:00
|
|
|
| ^^^^^---------^^-----------^^^^^^^^^^^^^^^^^
|
2018-09-29 05:47:47 -05:00
|
|
|
| | | |
|
|
|
|
| | | immutable borrow occurs here
|
|
|
|
| | immutable borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:119:51
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_static(Box::new(TrivialPass::new(&mut reg.sess_mut)));
|
2023-06-22 15:30:23 -05:00
|
|
|
| --- --------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
|
|
|
| | |
|
2018-09-29 05:47:47 -05:00
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| first mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:122:54
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_bound(Box::new(TrivialPass::new_mut(&mut reg.sess_mut)));
|
2023-06-22 15:30:23 -05:00
|
|
|
| --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
|
|
|
| | |
|
2018-09-29 05:47:47 -05:00
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| first mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:125:53
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_univ(Box::new(TrivialPass::new_mut(&mut reg.sess_mut)));
|
2023-06-22 15:30:23 -05:00
|
|
|
| --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
|
|
|
| | |
|
2018-09-29 05:47:47 -05:00
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| first mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:128:44
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_ref(&TrivialPass::new_mut(&mut reg.sess_mut));
|
2023-06-22 15:30:23 -05:00
|
|
|
| --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
|
|
|
| | |
|
2018-09-29 05:47:47 -05:00
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| first mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:138:5
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_bound(Box::new(CapturePass::new(®.sess_mut)));
|
2018-09-29 05:47:47 -05:00
|
|
|
| ^^^^--------------^^^^^^^^^^^^^^^^^^^^^^^^^^^-------------^^^
|
|
|
|
| | | |
|
|
|
|
| | | immutable borrow occurs here
|
|
|
|
| | immutable borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:141:5
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
LL | fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) {
|
|
|
|
| -- lifetime `'a` defined here
|
|
|
|
...
|
2018-09-04 09:22:22 -05:00
|
|
|
LL | reg.register_univ(Box::new(CapturePass::new(®.sess_mut)));
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-----------------------------------------^
|
|
|
|
| | | |
|
|
|
|
| | | immutable borrow occurs here
|
|
|
|
| | cast requires that `reg.sess_mut` is borrowed for `'a`
|
2018-09-04 09:22:22 -05:00
|
|
|
| mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0502]: cannot borrow `*reg` as mutable because it is also borrowed as immutable
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:144:5
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_ref(&CapturePass::new(®.sess_mut));
|
2018-09-29 05:47:47 -05:00
|
|
|
| ^^^^------------^^^^^^^^^^^^^^^^^^^-------------^^
|
|
|
|
| | | |
|
|
|
|
| | | immutable borrow occurs here
|
|
|
|
| | immutable borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `*reg` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:154:5
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut)));
|
2018-09-29 05:47:47 -05:00
|
|
|
| ^^^^--------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------^^^
|
|
|
|
| | | |
|
|
|
|
| | | first mutable borrow occurs here
|
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| second mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:154:54
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_bound(Box::new(CapturePass::new_mut(&mut reg.sess_mut)));
|
2023-06-22 15:30:23 -05:00
|
|
|
| --- -------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
|
|
|
| | |
|
2018-09-29 05:47:47 -05:00
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| first mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `*reg` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:158:5
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
2018-10-14 09:12:02 -05:00
|
|
|
LL | fn register_plugins<'a>(mk_reg: impl Fn() -> &'a mut Registry<'a>) {
|
|
|
|
| -- lifetime `'a` defined here
|
|
|
|
...
|
2018-09-04 09:22:22 -05:00
|
|
|
LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut)));
|
2018-10-14 09:12:02 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^-------------------------------------------------^
|
|
|
|
| | | |
|
|
|
|
| | | first mutable borrow occurs here
|
|
|
|
| | cast requires that `reg.sess_mut` is borrowed for `'a`
|
2018-09-04 09:22:22 -05:00
|
|
|
| second mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:158:53
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_univ(Box::new(CapturePass::new_mut(&mut reg.sess_mut)));
|
2023-06-22 15:30:23 -05:00
|
|
|
| --- ------------- ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
|
|
|
| | |
|
2018-09-29 05:47:47 -05:00
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| first mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `*reg` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:162:5
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut));
|
2018-09-29 05:47:47 -05:00
|
|
|
| ^^^^------------^^^^^^^^^^^^^^^^^^^^^^^-----------------^^
|
|
|
|
| | | |
|
|
|
|
| | | first mutable borrow occurs here
|
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| second mutable borrow occurs here
|
|
|
|
|
|
|
|
error[E0499]: cannot borrow `reg.sess_mut` as mutable more than once at a time
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/two-phase-surprise-no-conflict.rs:162:44
|
2018-09-04 09:22:22 -05:00
|
|
|
|
|
|
|
|
LL | reg.register_ref(&CapturePass::new_mut(&mut reg.sess_mut));
|
2023-06-22 15:30:23 -05:00
|
|
|
| --- ------------ ^^^^^^^^^^^^^^^^^ second mutable borrow occurs here
|
|
|
|
| | |
|
2018-09-29 05:47:47 -05:00
|
|
|
| | first borrow later used by call
|
2018-09-04 09:22:22 -05:00
|
|
|
| first mutable borrow occurs here
|
|
|
|
|
|
|
|
error: aborting due to 15 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0499, E0502, E0503.
|
2018-09-04 09:22:22 -05:00
|
|
|
For more information about an error, try `rustc --explain E0499`.
|