diff options
| author | bors <bors@rust-lang.org> | 2020-09-10 23:29:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-10 23:29:57 +0000 |
| commit | ee04f9a4dac3e72914862e9f2046eee70aedcbfd (patch) | |
| tree | 38f4ae06371563453a6dfc001af973259ac4bfbc /compiler/rustc_codegen_llvm/src | |
| parent | a1947b3f9e2831e2060bc42f0c78e4a2bb67930a (diff) | |
| parent | 2b54ab880c1803ff1178205b9b0a1c02238c37bf (diff) | |
| download | rust-ee04f9a4dac3e72914862e9f2046eee70aedcbfd.tar.gz rust-ee04f9a4dac3e72914862e9f2046eee70aedcbfd.zip | |
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`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
