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

demonstrate RHS != Self use cases for Add and Sub #35793

Merged
merged 2 commits into from
Sep 3, 2016

Conversation

matthew-piziak
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

r? @aturon

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

@matthew-piziak
Copy link
Contributor Author

r? @steveklabnik

@rust-highfive rust-highfive assigned steveklabnik and unassigned aturon Aug 18, 2016
@steveklabnik
Copy link
Member

@bors: r+ rollup

thanks a ton, this is great!

@bors
Copy link
Contributor

bors commented Aug 18, 2016

📌 Commit 96bd6cf has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Aug 18, 2016
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 19, 2016
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
@sophiajt
Copy link
Contributor

@bors r-

Looks like this might be causing a possible issue on Windows. @steveklabnik any idea what might cause:

Linkcheck stage2 (i686-pc-windows-gnu)
core\ops\trait.Add.html:121: broken link - time\struct.SystemTime.html
core\ops\trait.Sub.html:95: broken link - time\struct.SystemTime.html
std\ops\trait.Add.html:121: broken link - time\struct.SystemTime.html
std\ops\trait.Sub.html:95: broken link - time\struct.SystemTime.html


command did not execute successfully: "C:\\bot\\slave\\auto-win-gnu-32-opt-rustbuild\\build\\obj\\build\\i686-pc-windows-gnu\\stage2-tools\\i686-pc-windows-gnu\\release\\linkchecker.exe" "C:\\bot\\slave\\auto-win-gnu-32-opt-rustbuild\\build\\obj\\build\\i686-pc-windows-gnu\\doc"
expected success, got: exit code: 101


Makefile:49: recipe for target 'check' failed
>> rustjob: found 0 remaining processes

@steveklabnik
Copy link
Member

Does it need one .. and not two, maybe?

@sophiajt
Copy link
Contributor

@steveklabnik - no idea. Who's a good contact for rustdoc?

@sophiajt
Copy link
Contributor

I wonder if @brson or @alexcrichton might know...

@alexcrichton
Copy link
Member

I think the links here may have just one too many ../?

@matthew-piziak
Copy link
Contributor Author

@alexcrichton Is that the case? If I take https://doc.rust-lang.org/nightly/std/ops/trait.Add.html and add /../../time/struct.SystemTime.html. to the end of it, then it seems to navigate correctly. There's the question of the leading slash, of course. Now, a bigger issue for me is that I'm unable to test docs changes locally (rustdoc fails on multiple machines). If anybody wants to help me debug it on #rust-docs, that would be hugely helpful.

@alexcrichton
Copy link
Member

Sometimes the traits are rendered in multiple locations due to inlining in rustdoc, so maybe that's what's happening here?

@matthew-piziak
Copy link
Contributor Author

matthew-piziak commented Aug 23, 2016

I'm having difficulty testing this. When I run cargo docs in src/libcore on nightly I get the following output: https://gist.github.com/matthew-piziak/052e4db5d7dd57fe4ccfc95d05832ef1

@ollie27
Copy link
Member

ollie27 commented Aug 25, 2016

If I take https://doc.rust-lang.org/nightly/std/ops/trait.Add.html and add /../../time/struct.SystemTime.html. to the end of it, then it seems to navigate correctly.

That's not what the browser does. It basically tries to load https://doc.rust-lang.org/nightly/std/ops/../../time/struct.SystemTime.html which of course fails. So yeah, there is one too many ../s.

As far as I know the most reliable way to build the docs for testing is to use make docs see here.

@matthew-piziak
Copy link
Contributor Author

Thanks @ollie27! Fixed.

@matthew-piziak
Copy link
Contributor Author

Looks like the build is still being weird here. I don't think it's my fault this time...

@steveklabnik
Copy link
Member

Yes, this is not you. Let's give it a shot again on bors.

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Aug 30, 2016

📌 Commit 89f7e92 has been approved by steveklabnik

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Aug 30, 2016
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
@TimNN
Copy link
Contributor

TimNN commented Aug 30, 2016

This still fails linkcheck for me:

core/ops/trait.Sub.html:121: broken link - core/time/struct.SystemTime.html
core/ops/trait.Add.html:121: broken link - core/time/struct.SystemTime.html

@steveklabnik
Copy link
Member

@bors: r-

@matthew-piziak
Copy link
Contributor Author

Anybody have advice on how to run linkcheck locally?

@matthew-piziak
Copy link
Contributor Author

@matthew-piziak

cd src/tools/linkchecker
cargo run ../../lib_you_want_to_check

@matthew-piziak
Copy link
Contributor Author

@TimNN I cannot reproduce.

Here is my repro attempt:

  • make docs
  • open file:///home/matt/rustfork/rust/doc/std/ops/trait.Sub.html in Chromium
  • click on std::time::SystemTime link

This navigates to file:///home/matt/rustfork/rust/doc/std/time/struct.SystemTime.html as expected.

@TimNN
Copy link
Contributor

TimNN commented Aug 31, 2016

The problem is that Add / Sub are document in both core and std, however time is only in std.

Try the links from file:///home/matt/rustfork/rust/doc/core/ops/trait.Sub.html and you should get a 404.

@matthew-piziak
Copy link
Contributor Author

Thanks @TimNN!

@steveklabnik
Copy link
Member

Travis looks spurious, let's try with bors.

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Sep 1, 2016

📌 Commit 9a400f0 has been approved by steveklabnik

sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
sophiajt pushed a commit to sophiajt/rust that referenced this pull request Sep 2, 2016
…teveklabnik

demonstrate `RHS != Self` use cases for `Add` and `Sub`
bors added a commit that referenced this pull request Sep 3, 2016
Rollup of 12 pull requests

- Successful merges: #35754, #35793, #36099, #36160, #36171, #36178, #36180, #36190, #36198, #36205, #36210, #36223
- Failed merges:
@bors bors merged commit 9a400f0 into rust-lang:master Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants