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 example of using the indexing operator to HashMap docs #55519

Merged
merged 4 commits into from
Dec 28, 2018

Conversation

fhartwig
Copy link
Contributor

Fixes #52575

@rust-highfive
Copy link
Collaborator

r? @Kimundi

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 30, 2018
@TimNN
Copy link
Contributor

TimNN commented Nov 13, 2018

Ping from triage @Kimundi / @rust-lang/docs: This PR requires your review.

@fhartwig: #52575 mentions that the docs should also state that the HashMap can't be updated using the index notation, do you think you could include that.

Copy link
Member

@frewsxcv frewsxcv left a comment

Choose a reason for hiding this comment

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

can you also add the same line to the BTreeMap docs? https://doc.rust-lang.org/std/collections/struct.BTreeMap.html

@TimNN TimNN added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 20, 2018
@TimNN
Copy link
Contributor

TimNN commented Nov 27, 2018

Ping from triage @fhartwig: it looks like some changes have been requested to this PR.

@TimNN
Copy link
Contributor

TimNN commented Dec 4, 2018

Ping from triage @fhartwig: It looks like your PR needs to be updated.

@frewsxcv
Copy link
Member

frewsxcv commented Dec 4, 2018

I just pushed a commit w/ my suggestion, hope that's okay @fhartwig! Thanks for your contribution!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 4, 2018

📌 Commit 4bddb76 has been approved by frewsxcv

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 4, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
travis_time:end:2e195da0:start=1543953065982088445,finish=1543953138489016061,duration=72506927616
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:54:54] 
[00:54:54] running 120 tests
[00:54:57] i..ii...iii...iiii....i...i..........i..iii.............i.....i.....ii...i..i.ii..............i...ii 100/120
[00:54:57] ..ii.i.....iiii.....
[00:54:57] 
[00:54:57]  finished in 3.374
[00:54:57] travis_fold:end:test_codegen

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:55:11] 
[00:55:11] running 118 tests
[00:55:34] .iiiii...i.....i..i...i..i.i..i.i..i.....i..i....i..........iiii.........i.i....i...i.......ii.i.i.i 100/118
[00:55:38] ......iii.i.....ii
[00:55:38] 
[00:55:38]  finished in 26.892
[00:55:38] travis_fold:end:test_debuginfo

---
[01:04:36] error: no global memory allocator found but one is required; link to std or add #[global_allocator] to a static item that implements the GlobalAlloc trait.
[01:04:36] 
[01:04:36] 
[01:04:36] running 408 tests
[01:04:53] .............................................F...................................................... 100/408
[01:05:16] .................................................................................................... 300/408
[01:05:27] .................................................................................................... 400/408
' failed
' failed
[01:05:28] make: *** [check] Error 1
58684 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/release/deps
56896 ./src/llvm/test/MC
56108 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/release/build
55740 ./obj/build/x86_64-unknown-linux-gnu/test/run-pass/proc-macro
---
travis_time:end:2d0bca8d:start=1543957078483039607,finish=1543957078486971550,duration=3931943
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:122cfb59
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/

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)

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 4, 2018
…rewsxcv

Add example of using the indexing operator to HashMap docs

Fixes rust-lang#52575
@GuillaumeGomez
Copy link
Member

@bors: r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 5, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (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.
travis_time:end:0e0cc0ac:start=1544027612572084932,finish=1544027675108760406,duration=62536675474
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
travis_time:start:test_codegen
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:57:56] 
[00:57:56] running 120 tests
[00:57:59] i..ii...iii..iiii.....i...i..........i..iii.............i.....i.....ii...i..i.ii..............i...ii 100/120
[00:58:00] ..ii.i.....iiii.....
[00:58:00] 
[00:58:00]  finished in 3.525
[00:58:00] travis_fold:end:test_codegen

---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[00:58:16] 
[00:58:16] running 118 tests
[00:58:40] .iiiii...i.....i..i...i..i.i..i.i..i.....i..i....i..........iiii.........i.i....i...i.......ii.i.i.i 100/118
[00:58:44] ......iii.i.....ii
[00:58:44] 
[00:58:44]  finished in 28.661
[00:58:44] travis_fold:end:test_debuginfo

---
[01:08:16] error: no global memory allocator found but one is required; link to std or add #[global_allocator] to a static item that implements the GlobalAlloc trait.
[01:08:16] 
[01:08:16] 
[01:08:16] running 408 tests
[01:08:34] ...............................................F.................................................... 100/408
[01:09:02] .................................................................................................... 300/408
[01:09:14] .................................................................................................... 400/408
[01:09:15] ........
[01:09:15] failures:
[01:09:15] failures:
[01:09:15] 
[01:09:15] ---- collections/btree/map.rs - collections::btree::map::BTreeMap (line 69) stdout ----
[01:09:15] thread 'collections/btree/map.rs - collections::btree::map::BTreeMap (line 69)' panicked at 'test executable failed:
[01:09:15] We've got 4 reviews, but Les Misérables ain't one.
[01:09:15] Up! is unreviewed.
[01:09:15] Office Space: Deals with real issues in the workplace.
[01:09:15] 
[01:09:15] thread 'main' panicked at 'no entry found for key', src/libcore/option.rs:1008:5
[01:09:15] 
[01:09:15] ', src/librustdoc/test.rs:358:17
[01:09:15] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:09:15] 
---
[01:09:15] 
[01:09:15] error: test failed, to rerun pass '--doc'
[01:09:15] 
[01:09:15] 
[01:09:15] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-p" "alloc" "--" "--quiet"
[01:09:15] 
[01:09:15] 
[01:09:15] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:09:15] Build completed unsuccessfully in 0:22:26
[01:09:15] Build completed unsuccessfully in 0:22:26
[01:09:15] make: *** [check] Error 1
[01:09:15] Makefile:58: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:021cc3f0
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Wed Dec  5 17:44:00 UTC 2018
---
travis_time:end:020925b6:start=1544031842064199093,finish=1544031842070011407,duration=5812314
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:08b40f82
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/

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)

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 8, 2018
@Centril
Copy link
Contributor

Centril commented Dec 24, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Dec 24, 2018

📌 Commit adfc066 has been approved by Centril

@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 Dec 24, 2018
@bors
Copy link
Contributor

bors commented Dec 25, 2018

⌛ Testing commit adfc066 with merge 7e0cf3069ebda9f9259502a225e4eda7102dc4e9...

@bors
Copy link
Contributor

bors commented Dec 25, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 25, 2018
@kennytm
Copy link
Member

kennytm commented Dec 27, 2018

@bors retry

@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 Dec 27, 2018
@bors
Copy link
Contributor

bors commented Dec 28, 2018

⌛ Testing commit adfc066 with merge ee49bf8...

bors added a commit that referenced this pull request Dec 28, 2018
Add example of using the indexing operator to HashMap docs

Fixes #52575
@bors
Copy link
Contributor

bors commented Dec 28, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Centril
Pushing ee49bf8 to master...

@bors bors merged commit adfc066 into rust-lang:master Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants