Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BTreeMap::remove_entry #68378

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Add BTreeMap::remove_entry #68378

merged 1 commit into from
Jan 29, 2020

Conversation

billyrieger
Copy link
Contributor

Implements #66714.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @KodrAus (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 20, 2020
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-01-20T03:21:10.0120382Z ========================== Starting Command Output ===========================
2020-01-20T03:21:10.0127846Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/db6fc133-41ba-4664-a346-c5b46a5aedac.sh
2020-01-20T03:21:10.1308748Z 
2020-01-20T03:21:10.1352692Z ##[section]Finishing: Disable git automatic line ending conversion
2020-01-20T03:21:10.1358370Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68378/merge to s
2020-01-20T03:21:10.1360697Z Task         : Get sources
2020-01-20T03:21:10.1360777Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-20T03:21:10.1360811Z Version      : 1.0.0
2020-01-20T03:21:10.1360843Z Author       : Microsoft
---
2020-01-20T03:21:11.1586563Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-01-20T03:21:11.1597462Z ##[command]git config gc.auto 0
2020-01-20T03:21:11.1599838Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-01-20T03:21:11.1602474Z ##[command]git config --get-all http.proxy
2020-01-20T03:21:11.1608650Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68378/merge:refs/remotes/pull/68378/merge
---
2020-01-20T04:16:27.8331281Z .................................................................................................... 1700/9538
2020-01-20T04:16:34.0730617Z .................................................................................................... 1800/9538
2020-01-20T04:16:45.4804482Z ...................i................................................................................ 1900/9538
2020-01-20T04:16:52.5059289Z .................................................................................................... 2000/9538
2020-01-20T04:17:07.8456403Z .........iiiii...................................................................................... 2100/9538
2020-01-20T04:17:17.1535128Z .................................................................................................... 2300/9538
2020-01-20T04:17:19.5286402Z .................................................................................................... 2400/9538
2020-01-20T04:17:24.7837080Z .................................................................................................... 2500/9538
2020-01-20T04:17:45.4066011Z .................................................................................................... 2600/9538
---
2020-01-20T04:20:23.2850194Z .....................................................i...............i.............................. 4900/9538
2020-01-20T04:20:31.0317326Z .................................................................................................... 5000/9538
2020-01-20T04:20:38.7493971Z ................................................................................................i... 5100/9538
2020-01-20T04:20:43.8122678Z .................................................................................................... 5200/9538
2020-01-20T04:20:54.2509332Z ....................................................................ii.ii...........i............... 5300/9538
2020-01-20T04:21:03.1598934Z .....i.............................................................................................. 5500/9538
2020-01-20T04:21:13.1661630Z .................................................................................................... 5600/9538
2020-01-20T04:21:19.7573048Z ......................................................i............................................. 5700/9538
2020-01-20T04:21:26.7094249Z .................................................................................................... 5800/9538
2020-01-20T04:21:26.7094249Z .................................................................................................... 5800/9538
2020-01-20T04:21:36.7453619Z .................................................................................................... 5900/9538
2020-01-20T04:21:43.6047512Z ............................................ii...i..ii...........i.................................. 6000/9538
2020-01-20T04:22:05.5028015Z .................................................................................................... 6200/9538
2020-01-20T04:22:13.5099052Z .................................................................................................... 6300/9538
2020-01-20T04:22:13.5099052Z .................................................................................................... 6300/9538
2020-01-20T04:22:23.2921103Z ........................................................................i..ii....................... 6400/9538
2020-01-20T04:22:56.4426231Z .................................................................................................... 6600/9538
2020-01-20T04:22:59.3631853Z ................................................i................................................... 6700/9538
2020-01-20T04:23:01.5469656Z .................................................................................................... 6800/9538
2020-01-20T04:23:03.8217499Z ...............................................i.................................................... 6900/9538
---
2020-01-20T04:24:40.7784672Z .................................................................................................... 7500/9538
2020-01-20T04:24:45.3614839Z .................................................................................................... 7600/9538
2020-01-20T04:24:50.9559987Z .................................................................................................... 7700/9538
2020-01-20T04:24:57.5521944Z .................................................................................................... 7800/9538
2020-01-20T04:25:08.3607187Z ..................................................................................................ii 7900/9538
2020-01-20T04:25:14.6824632Z iiiii............................................................................................... 8000/9538
2020-01-20T04:25:29.4468149Z .................................................................................................... 8200/9538
2020-01-20T04:25:40.9372095Z .................................................................................................... 8300/9538
2020-01-20T04:25:53.3508663Z .................................................................................................... 8400/9538
2020-01-20T04:25:59.0820105Z .................................................................................................... 8500/9538
---
2020-01-20T04:28:21.0419001Z  finished in 7.353
2020-01-20T04:28:21.0599320Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-20T04:28:21.2222782Z 
2020-01-20T04:28:21.2223352Z running 166 tests
2020-01-20T04:28:24.2572273Z iiii......i........ii..iiii...i....i...........i............i..i..................i....i............ 100/166
2020-01-20T04:28:26.4847959Z i.i.i...iii..iiiiiii.......................iii............ii......
2020-01-20T04:28:26.4851018Z 
2020-01-20T04:28:26.4854243Z  finished in 5.425
2020-01-20T04:28:26.5038299Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-20T04:28:26.6579008Z 
---
2020-01-20T04:28:28.6086343Z  finished in 2.105
2020-01-20T04:28:28.6276640Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-20T04:28:28.7858441Z 
2020-01-20T04:28:28.7859272Z running 9 tests
2020-01-20T04:28:28.7860344Z iiiiiiiii
2020-01-20T04:28:28.7860991Z 
2020-01-20T04:28:28.7861040Z  finished in 0.158
2020-01-20T04:28:28.8042240Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-20T04:28:28.9737308Z 
---
2020-01-20T04:28:48.5412036Z  finished in 19.737
2020-01-20T04:28:48.5606183Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-20T04:28:48.7238698Z 
2020-01-20T04:28:48.7239079Z running 116 tests
2020-01-20T04:29:13.6206476Z .iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii..........i.....i..i.......ii.i.ii 100/116
2020-01-20T04:29:17.0037721Z .....iiii.....ii
2020-01-20T04:29:17.0039411Z 
2020-01-20T04:29:17.0039745Z  finished in 28.443
2020-01-20T04:29:17.0044950Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-01-20T04:29:17.0045801Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-01-20T04:41:27.2086858Z ---- collections/btree/map.rs - collections::btree::map::BTreeMap<K, V>::remove_entry (line 826) stdout ----
2020-01-20T04:41:27.2087136Z error[E0658]: use of unstable library feature 'btreemap_remove_entry'
2020-01-20T04:41:27.2087448Z  --> collections/btree/map.rs:831:16
2020-01-20T04:41:27.2087497Z   |
2020-01-20T04:41:27.2087543Z 8 | assert_eq!(map.remove_entry(&1), Some((1, "a")));
2020-01-20T04:41:27.2087645Z   |
2020-01-20T04:41:27.2087645Z   |
2020-01-20T04:41:27.2088015Z   = note: for more information, see ***/issues/66714
2020-01-20T04:41:27.2088229Z   = help: add `#![feature(btreemap_remove_entry)]` to the crate attributes to enable
2020-01-20T04:41:27.2089217Z error[E0658]: use of unstable library feature 'btreemap_remove_entry'
2020-01-20T04:41:27.2089513Z  --> collections/btree/map.rs:832:16
2020-01-20T04:41:27.2089598Z   |
2020-01-20T04:41:27.2089598Z   |
2020-01-20T04:41:27.2089645Z 9 | assert_eq!(map.remove_entry(&1), None);
2020-01-20T04:41:27.2089751Z   |
2020-01-20T04:41:27.2089751Z   |
2020-01-20T04:41:27.2090067Z   = note: for more information, see ***/issues/66714
2020-01-20T04:41:27.2090129Z   = help: add `#![feature(btreemap_remove_entry)]` to the crate attributes to enable
2020-01-20T04:41:27.2090225Z error: aborting due to 2 previous errors
2020-01-20T04:41:27.2090255Z 
2020-01-20T04:41:27.2090519Z For more information about this error, try `rustc --explain E0658`.
2020-01-20T04:41:27.2090751Z Couldn't compile the test.
---
2020-01-20T04:41:27.2262775Z   local time: Mon Jan 20 04:41:27 UTC 2020
2020-01-20T04:41:27.7755131Z   network time: Mon, 20 Jan 2020 04:41:27 GMT
2020-01-20T04:41:27.7755224Z == end clock drift check ==
2020-01-20T04:41:28.3424878Z 
2020-01-20T04:41:28.3531051Z ##[error]Bash exited with code '1'.
2020-01-20T04:41:28.3542520Z ##[section]Finishing: Run build
2020-01-20T04:41:28.3564226Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68378/merge to s
2020-01-20T04:41:28.3566764Z Task         : Get sources
2020-01-20T04:41:28.3566827Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-01-20T04:41:28.3566874Z Version      : 1.0.0
2020-01-20T04:41:28.3566915Z Author       : Microsoft
2020-01-20T04:41:28.3566915Z Author       : Microsoft
2020-01-20T04:41:28.3566962Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-01-20T04:41:28.3567153Z ==============================================================================
2020-01-20T04:41:28.7910578Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-01-20T04:41:28.7949773Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/68378/merge to s
2020-01-20T04:41:28.8085970Z Cleaning up task key
2020-01-20T04:41:28.8086864Z Start cleaning up orphan processes.
2020-01-20T04:41:28.8196161Z Terminate orphan process: pid (3745) (python)
2020-01-20T04:41:28.8437020Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@jonas-schievink jonas-schievink added A-collections Area: std::collections. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jan 20, 2020
Copy link
Contributor

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @billyrieger! This looks good to me.

Would you like to squash your 3 commits down and I'll merge this one in?

Mainly for API parity with HashMap.

- Add BTreeMap::remove_entry
- Rewrite BTreeMap::remove to use remove_entry
- Use btreemap_remove_entry feature in doc comment
@billyrieger
Copy link
Contributor Author

@KodrAus done!

@KodrAus
Copy link
Contributor

KodrAus commented Jan 28, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 28, 2020

📌 Commit 5654305 has been approved by KodrAus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 28, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 29, 2020
bors added a commit that referenced this pull request Jan 29, 2020
Rollup of 8 pull requests

Successful merges:

 - #68289 (Don't ICE on path-collision in dep-graph)
 - #68378 (Add BTreeMap::remove_entry)
 - #68553 (Fix run button positionning in case of scrolling)
 - #68556 (rustdoc: Fix re-exporting primitive types)
 - #68582 (Add E0727 long explanation)
 - #68592 (fix: typo in vec.rs)
 - #68619 (Fix a few spelling mistakes)
 - #68620 (Update links to WASI docs in time.rs module)

Failed merges:

r? @ghost
@bors bors merged commit 5654305 into rust-lang:master Jan 29, 2020
@billyrieger billyrieger deleted the btreemap-remove-entry branch February 1, 2020 22:48
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 25, 2020
stabilize BTreeMap::remove_entry

This PR stabilizes `BTreeMap::remove_entry` as implemented in rust-lang#68378.

Closes rust-lang#66714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-collections Area: std::collections. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants