Skip to content

Conversation

mdibaiee
Copy link
Contributor

@mdibaiee mdibaiee commented Dec 30, 2021

Fixes #90703

This seems to work:
image

I'm just afraid I might have missed some cases / broken previous functionality.

I also have not written tests yet, I will have to take a look to see where tests are and how they are structured, but any help there is also appreciated.

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 30, 2021
@rust-highfive
Copy link
Contributor

Some changes occurred in intra-doc-links.

cc @jyn514

@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch from bf43a4f to 61bc754 Compare December 30, 2021 17:09
@rust-highfive
Copy link
Contributor

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

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 Dec 30, 2021
@rust-log-analyzer

This comment has been minimized.

@mdibaiee
Copy link
Contributor Author

The job x86_64-gnu-llvm-12 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)

If I understand this correctly, we have tests that confirm that associated items on primitive types don't work, and because now they work as part of this PR, this test is failing. I suppose I can delete these tests and instead write tests for them working?

@camelid
Copy link
Member

camelid commented Jan 2, 2022

r? @Manishearth

@rust-highfive rust-highfive assigned Manishearth and unassigned ollie27 Jan 2, 2022
@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch from 4fc428e to 55543ae Compare January 2, 2022 21:27
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch from bdaa71b to a61b438 Compare January 3, 2022 07:05
@rust-log-analyzer

This comment has been minimized.

@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch 2 times, most recently from 2760760 to 3183a79 Compare January 3, 2022 10:09
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 3, 2022

📌 Commit 9146339a2d016db07d0461c8c5c0da6b5c19baec has been approved by Manishearth

@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 3, 2022
@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch from 4ac9a3f to d0db13f Compare January 3, 2022 18:10
@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 Jan 5, 2022
@camelid
Copy link
Member

camelid commented Jan 5, 2022

Weird... I think those should have been run on CI.

@mdibaiee
Copy link
Contributor Author

mdibaiee commented Jan 5, 2022

Weird indeed, I ran these tests locally and they passed. I’ll take a look now

@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch from eb00e14 to c3785ae Compare January 5, 2022 07:32
@mdibaiee
Copy link
Contributor Author

mdibaiee commented Jan 5, 2022

Okay I think I found the issue: I was using these XPATHs:

// @has 'prim_associated_traits/struct.Number.html' '//a[@href="https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.from_str"]' 'f64::from_str()'

I just noticed all other tests in the same directory use {{channel}} instead of https://doc.rust-lang.org/nightly, so I changed it to:

// @has 'prim_associated_traits/struct.Number.html' '//a[@href="{{channel}}/std/primitive.f64.html#method.from_str"]' 'f64::from_str()'

The test that failed is stable and that's failing because I'm expecting nightly links. My bad.
Commit coming soon.

Latest push includes the fix.

@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch from c6dfca4 to c3c6f79 Compare January 5, 2022 07:58
@mdibaiee mdibaiee force-pushed the 90703/resolve-traits-of-primitive-types branch from c3c6f79 to 973cf63 Compare January 5, 2022 08:04
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 5, 2022

📌 Commit 973cf63 has been approved by Manishearth

@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 Jan 5, 2022
@jyn514
Copy link
Member

jyn514 commented Jan 5, 2022

@pietroalbini your checks are paying off :)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 5, 2022
…imitive-types, r=Manishearth

Rustdoc: resolve associated traits for non-generic primitive types

Fixes rust-lang#90703

This seems to work:
<img width="457" alt="image" src="https://user-images.githubusercontent.com/2807772/147774059-9556ff96-4519-409e-8ed0-c33ecc436171.png">

I'm just afraid I might have missed some cases / broken previous functionality.

I also have not written tests yet, I will have to take a look to see where tests are and how they are structured, but any help there is also appreciated.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 5, 2022
…imitive-types, r=Manishearth

Rustdoc: resolve associated traits for non-generic primitive types

Fixes rust-lang#90703

This seems to work:
<img width="457" alt="image" src="https://user-images.githubusercontent.com/2807772/147774059-9556ff96-4519-409e-8ed0-c33ecc436171.png">

I'm just afraid I might have missed some cases / broken previous functionality.

I also have not written tests yet, I will have to take a look to see where tests are and how they are structured, but any help there is also appreciated.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 6, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#92058 (Make Run button visible on hover)
 - rust-lang#92288 (Fix a pair of mistyped test cases in `std::net::ip`)
 - rust-lang#92349 (Fix rustdoc::private_doc_tests lint for public re-exported items)
 - rust-lang#92360 (Some cleanups around check_argument_types)
 - rust-lang#92389 (Regression test for borrowck ICE rust-lang#92015)
 - rust-lang#92404 (Fix font size for [src] links in headers)
 - rust-lang#92443 (Rustdoc: resolve associated traits for non-generic primitive types)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 26a90e4 into rust-lang:master Jan 6, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 6, 2022
@mdibaiee mdibaiee deleted the 90703/resolve-traits-of-primitive-types branch January 6, 2022 18:51
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: cannot resolve links to associated trait items for primitives
10 participants