You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0502]: cannot borrow `map.root` as mutable because it is also borrowedasimmutable
--> /home/philipp/.rustup/toolchains/bisector-ci-1b9daa69640970e7858b7c8e1c9f72c604985e11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map.rs:295:25
|
295 | let root_node = map.root.get_or_insert_with(|| Root::new(&*map.alloc)).borrow_mut();
| ^^^^^^^^^------------------^--^^^^^^^^^^^^^---------^^
| | | | |
| | | | first borrow occurs due to use of `map` in closure
| | | immutable borrow occurs here
| | immutable borrow later used by call
| mutable borrow occurs here
error[E0502]: cannot borrow `self.root` as mutable because it is also borrowed as immutable
--> /home/philipp/.rustup/toolchains/bisector-ci-1b9daa69640970e7858b7c8e1c9f72c604985e11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map.rs:1112:20
|
1112 | let root = self.root.get_or_insert_with(|| Root::new(&*self.alloc));
| ^^^^^^^^^^------------------^--^^^^^^^^^^^^^----------^^
| | | | |
| | | | first borrow occurs due to use of `self` in closure
| | | immutable borrow occurs here
| | immutable borrow later used by call
| mutable borrow occurs here
The alloc library was switched to the 2021 edition in <rust-lang/rust#92068>. However, it did not use any features of the new edition until PR <rust-lang/rust#98103>, which relies on the newer closure capture mechanism. This commit fixes the build on the latest nightlies, which include that PR.
Fixes#104
The following error occurs:
The
cargo bisect-rustc
tool points to this commit: rust-lang/rust@1b9daa6The error does not happen with cargo's own
-Zbuild-std
, so it must depend on the build command somehow.The text was updated successfully, but these errors were encountered: