rust/library
bors ee04f9a4da Auto merge of #74437 - ssomers:btree_no_root_in_noderef, r=Mark-Simulacrum
BTreeMap: move up reference to map's root from NodeRef

Since the introduction of `NodeRef` years ago, it also contained a mutable reference to the owner of the root node of the tree (somewhat disguised as *const). Its intent is to be used only when the rest of the `NodeRef` is no longer needed. Moving this to where it's actually used, thought me 2 things:
- Some sort of "postponed mutable reference" is required in most places that it is/was used, and that's exactly where we also need to store a reference to the length (number of elements) of the tree, for the same reason. The length reference can be a normal reference, because the tree code does not care about tree length (just length per node).
- It's downright obfuscation in `from_sorted_iter` (transplanted to #75329)
- It's one of the reasons for the scary notice on `reborrow_mut`, the other one being addressed in #73971.

This does repeat the raw pointer code in a few places, but it could be bundled up with the length reference.

r? `@Mark-Simulacrum`
2020-09-10 23:29:57 +00:00
..
alloc Auto merge of #74437 - ssomers:btree_no_root_in_noderef, r=Mark-Simulacrum 2020-09-10 23:29:57 +00:00
backtrace@4083a90168 std: Switch from libbacktrace to gimli 2020-07-28 16:34:01 -07:00
core Rollup merge of #76568 - GuillaumeGomez:add-missing-examples, r=jyn514 2020-09-10 12:20:15 -07:00
panic_abort Rollup merge of #75990 - rylev:arm-fastfail, r=alexcrichton 2020-08-30 01:43:54 +02:00
panic_unwind Auto merge of #70212 - Amanieu:catch_foreign, r=Mark-Simulacrum 2020-08-28 01:20:17 +00:00
proc_macro Respect `-Z proc-macro-backtrace` flag for panics inside libproc_macro 2020-09-03 12:13:26 -04:00
profiler_builtins Fix warning whe building profiler_builtins crate 2020-09-04 15:10:29 +02:00
rtstartup mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-alloc mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-core mv std libs to library/ 2020-07-27 19:51:13 -05:00
rustc-std-workspace-std mv std libs to library/ 2020-07-27 19:51:13 -05:00
std Rollup merge of #76458 - mbrubeck:hash_drain_filter, r=Amanieu 2020-09-09 21:02:27 -07:00
stdarch@78891cdf29 fix broken git commit in stdarch 2020-08-03 15:52:30 +08:00
term mv std libs to library/ 2020-07-27 19:51:13 -05:00
test Prefer https link for wikipedia URLs 2020-08-23 10:02:42 +00:00
unwind Add back unwinding support for Sony PSP 2020-08-08 02:14:40 -04:00