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

Removed the dead links from cell.rs #60539

Closed
wants to merge 1 commit into from

Conversation

DevQps
Copy link
Contributor

@DevQps DevQps commented May 4, 2019

Description

Removed some dead links. The code used to refer to the method borrow that (I think?) used to exist on Box. However, now it is implemented by the Borrow trait. I find nothing on the Borrow docs that the borrow of Borrow can panic as was stated in the documentation. So I removed these lines.

closes #60442

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(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 May 4, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.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:074e9790:start=1556965254992540817,finish=1556965255780384680,duration=787843863
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[01:07:40]  Documenting core v0.0.0 (/checkout/src/libcore)
[01:07:56] error: `[borrow_mut]` cannot be resolved, ignoring it...
[01:07:56]    --> src/libcore/cell.rs:930:10
[01:07:56]     |
[01:07:56] 930 |     /// [`borrow_mut`] method instead if `self` isn't mutable.
[01:07:56]     |
[01:07:56] note: lint level defined here
[01:07:56]    --> src/libcore/lib.rs:64:9
[01:07:56]     |
[01:07:56]     |
[01:07:56] 64  | #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
[01:07:56]     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:07:56]     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
[01:07:56] 
[01:07:56] error: `[borrow_mut]` cannot be resolved, ignoring it...
[01:07:56]    --> src/libcore/cell.rs:933:51
[01:07:56]     |
[01:07:56] 933 |     /// not what you want. In case of doubt, use [`borrow_mut`] instead.
[01:07:56]     |
[01:07:56]     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
[01:07:56] 
[01:07:57] error: aborting due to 2 previous errors
[01:07:57] error: aborting due to 2 previous errors
[01:07:57] 
[01:07:57] error: Could not document `core`.
[01:07:57] 
[01:07:57] Caused by:
[01:07:57]   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-name core src/libcore/lib.rs --color always --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc --markdown-css rust.css --markdown-no-toc --generate-redirect-pages --resource-suffix 1.36.0 --index-page /checkout/src/doc/index.md -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/release/deps` (exit code: 1)
[01:07:57] 
[01:07:57] 
[01:07:57] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-Z" "unstable-options" "-p" "core" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "--generate-redirect-pages" "--resource-suffix" "1.36.0" "--index-page" "/checkout/src/doc/index.md"
[01:07:57] 
[01:07:57] 
[01:07:57] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap doc
[01:07:57] Build completed unsuccessfully in 0:07:49
---
travis_time:end:0b6bc508:start=1556969345678496687,finish=1556969345683963528,duration=5466841
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:112d37fe
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0a754442
travis_time:start:0a754442
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:07592aa5
$ dmesg | grep -i kill

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)

@DevQps
Copy link
Contributor Author

DevQps commented May 4, 2019

@alexcrichton I am not sure what to do with this error message actually. It seems a bit unrelated to the things I did. What do you suggest on doing?

@ehuss
Copy link
Contributor

ehuss commented May 4, 2019

I'm not sure I understand this PR. For me, the links seem to be working.

https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html#method.try_borrow clicking on the borrow link jumps to the RefCell::borrow method.

https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html#method.try_borrow_mut clicking on the borrow_mut link jumps to the RefCell::borrow_mut method.

https://doc.rust-lang.org/nightly/core/cell/struct.RefCell.html#method.get_mut clicking on the borrow_mut link jumps to the RefCell::borrow_mut method.

RefCell implements its own borrow methods.

As for the original issue, the link https://doc.rust-lang.org/std/boxed/struct.Box.html#method.borrow isn't invalid per se, it's just that the methods are hidden. If you expand the methods for impl<T> Borrow<T> for Box<T>, you can see the method is highlighted. That is part of #60200, where those aren't expanding when they should.

@DevQps
Copy link
Contributor Author

DevQps commented May 6, 2019

Hey @ehuss

I think I am finally putting all the pieces together! I see that the issue has already been closed because of the reasons that you provided (thanks for that). I will close this PR now, since the issue is mainly due to the trait implementations not unfolding.

@DevQps DevQps closed this May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: dead link to std::boxed::Box::borrow
4 participants