Skip to content

Switch to intra-doc links in core/src/{convert,iter}/mod.rs #75969

New issue

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

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

Already on GitHub? # to your account

Merged
merged 4 commits into from
Aug 31, 2020

Conversation

nixphix
Copy link
Contributor

@nixphix nixphix commented Aug 27, 2020

Partial fix for #75080

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514

couldn't fix these

     ../../std/string/struct.String.html
     ../../std/primitive.never.html
     ../../std/sync/mpsc/struct.TryIter.html

@rustbot rustbot added A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 27, 2020
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 27, 2020
@jyn514 jyn514 removed the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 27, 2020
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

Let's avoid repeating Iterator:: everywhere; it's pretty clear here that's what we're talking about and the Iterator docs are already pretty long.

@jyn514
Copy link
Member

jyn514 commented Aug 27, 2020

error: `[i32::MAX]` cannot be resolved, ignoring it.
   --> library/core/src/convert/mod.rs:413:40
    |
413 | /// giving the [`i64`]'s value modulo [`i32::MAX`]) or by simply returning
    |                                        ^^^^^^^^^^ cannot be resolved, ignoring

Hmm ... This looks like either #74489 or #75649. If you wait for the beta bump today they should both be fixed.

@jyn514
Copy link
Member

jyn514 commented Aug 28, 2020

Beta was bumped today, try rebasing and see if it fixes the CI failure?

@nixphix
Copy link
Contributor Author

nixphix commented Aug 30, 2020

@jyn514 tried rebasing twice still filing for the same reason, should I revert the change?

@jyn514
Copy link
Member

jyn514 commented Aug 30, 2020

@jyn514 tried rebasing twice still filing for the same reason, should I revert the change?

I fixed the issue in #76093. You should revert the change in the meantime, since it will break with doc --stage 0 until the next release in 6 weeks.

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 30, 2020
Fix intra-doc links for associated constants

Previously, only associated functions would be resolved. Fixes the issues in rust-lang#75969 (comment).

I'm a little uncomfortable hard-coding the string constants, but it looks like that's how it's done elsewhere. I might make a follow-up PR at some point putting it in one place.

Not sure how to test associated types, since AFAIK there aren't any on primitives.

r? @Manishearth
@nixphix
Copy link
Contributor Author

nixphix commented Aug 30, 2020

@jyn514 checks passed, I have set a reminder to fix this later

@jyn514
Copy link
Member

jyn514 commented Aug 30, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 30, 2020

📌 Commit 7ea4c28 has been approved by jyn514

@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 Aug 30, 2020
@jyn514
Copy link
Member

jyn514 commented Aug 30, 2020

@bors r-

Sorry - I missed a broken link. This will no longer resolve: https://github.com/rust-lang/rust/pull/75969/files#diff-d95315c7bb4e51591e307e2659bad42bL42 because you removed the Some(Item) reference link. It doesn't give an error because rustdoc skips links with ( or < on the assumption they weren't meant to be intra-doc links.

@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 Aug 30, 2020
@nixphix
Copy link
Contributor Author

nixphix commented Aug 30, 2020

ok let me add Some(Item)

@jyn514
Copy link
Member

jyn514 commented Aug 30, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 30, 2020

📌 Commit 523fea4 has been approved by jyn514

@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 Aug 30, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Aug 30, 2020
Switch to intra-doc links in core/src/{convert,iter}/mod.rs

Partial fix for rust-lang#75080

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514

couldn't fix these

```rust
     ../../std/string/struct.String.html
     ../../std/primitive.never.html
     ../../std/sync/mpsc/struct.TryIter.html
```
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Aug 31, 2020
Switch to intra-doc links in core/src/{convert,iter}/mod.rs

Partial fix for rust-lang#75080

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514

couldn't fix these

```rust
     ../../std/string/struct.String.html
     ../../std/primitive.never.html
     ../../std/sync/mpsc/struct.TryIter.html
```
matklad added a commit to matklad/rust that referenced this pull request Aug 31, 2020
Switch to intra-doc links in core/src/{convert,iter}/mod.rs

Partial fix for rust-lang#75080

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514

couldn't fix these

```rust
     ../../std/string/struct.String.html
     ../../std/primitive.never.html
     ../../std/sync/mpsc/struct.TryIter.html
```
This was referenced Aug 31, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2020
Rollup of 9 pull requests

Successful merges:

 - rust-lang#75969 (Switch to intra-doc links in core/src/{convert,iter}/mod.rs)
 - rust-lang#76023 (Liballoc extend use intra doc link)
 - rust-lang#76033 (Add missing hyphen)
 - rust-lang#76052 (rust-langGH-66816:  Remove disable attr before return)
 - rust-lang#76055 (Keep doc standard for Vec DrainFilter)
 - rust-lang#76058 (Use assertions on Vec doc)
 - rust-lang#76069 (Use explicit intra-doc link in path for Vec resize)
 - rust-lang#76117 (Update README.md)
 - rust-lang#76134 (Update MinGW instructions to include ninja)

Failed merges:

r? @ghost
@bors bors merged commit c601714 into rust-lang:master Aug 31, 2020
@cuviper cuviper added this to the 1.48.0 milestone Nov 17, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name 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.

6 participants