Uh oh!
There was an error while loading. Please reload this page.
Use intra-doc links for core/src/slice.mod.rs - #75932
Conversation
rust-highfive
commented
Aug 26, 2020
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jyn514 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
jyn514
left a comment
There was a problem hiding this comment.
There are a lot more links that can still be converted (e.g.
rust/library/core/src/slice/mod.rs
Line 7 in 197187f
r=me with comments addressed
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jyn514
commented
Aug 26, 2020
Use |
Amjad50
commented
Aug 26, 2020
Thanks so much for the coverage 👍 . I'm not sure how can I fix this, I don't think I can use |
jyn514
commented
Aug 26, 2020
You can :) This is linking to https://doc.rust-lang.org/std/slice/index.html, which is a re-export of https://doc.rust-lang.org/core/slice/index.html, which is the current module. So |
jyn514
commented
Aug 26, 2020
Oh hmm - it looks like that's not quite true, the |
Amjad50
commented
Aug 26, 2020
Yah, thats what made me think of keeping it. |
Amjad50
commented
Aug 26, 2020
Even though this is 7k file, but not many changes |
Amjad50
commented
Aug 26, 2020
Ok, can I link ? |
Amjad50
commented
Aug 26, 2020
It appears yes, I can |
jyn514
commented
Aug 26, 2020
This is #65983, fixed by #73101. If you wait a day or two until the beta bump it will be fixed then; if not you'll have to revert the changes. |
Amjad50
commented
Aug 26, 2020
sorry I didn't run the checker for that. Ok I guess we can wait for it to be fixed. Thanks again for the help |
jyn514
commented
Aug 26, 2020
That's ok, that's what CI is for :) |
jyn514
commented
Aug 28, 2020
Beta was bumped today, so this should be good to go after a rebase :) |
Amjad50
commented
Aug 28, 2020
still broken :( |
jyn514
commented
Aug 28, 2020
@Amjad50 you haven't rebased, so it's showing the test result from the previous compiler. Try rebasing over master. |
I rebased, when I push to here should I force? or just merge with the previous |
jyn514
commented
Aug 28, 2020
You should force-push, yes. |
jyn514
commented
Aug 28, 2020
If you merge it defeats the point of rebasing: it shows both the old and new commits, and makes it look in the diff as if you have all the hundreds of commits that you rebased over. |
- most are using primitive types links, which cannot be used with intra links at the moment - also `std` cannot be referenced in any link
b16984f to
6aae4a2CompareAmjad50
commented
Aug 28, 2020
Is the rebase done correctly? It failed |
jyn514
commented
Aug 28, 2020
Your rebase is fine but the bug was still not fixed :( It's a rustdoc bug of some sort, I'll try to look into it this weekend. If you can reproduce outside the standard library that would be amazing ❤️ but no problem if you're not sure how. |
Amjad50
commented
Aug 28, 2020
Definitely, I really love contributing. Thanks so much for the help.😊 |
I don't understand why this is failing :/ the error is being returned directly from |
`alloc::slice` uses `core::slice` functions, documentation are copied from there and the links as well without resolution. `crate::ptr...` cannot be resolved in `alloc::slice`, but `ptr` itself is imported in both `alloc::slice` and `core::slice`, so we used that instead.
Amjad50
commented
Aug 30, 2020
I think I fixed it, the problem in general is not solved. But for this case, we can use |
Amjad50
commented
Aug 30, 2020
So from what I understand, Is there a way to change it so it resolves first and then copy the documentation? And would that affect other documentation processes. |
jyn514
commented
Aug 30, 2020
The fact that it does this is a bug, and I thought I fixed it in #73101. I don't know why it's still happening. |
jyn514
commented
Aug 30, 2020
In fact if you look at the debug logging it shouldn't be resolving in the current scope: it says itself that it's looking at core: |
Amjad50
commented
Aug 30, 2020
Should this be merged? Or you think it's better to fix the problem first? |
jyn514
commented
Aug 30, 2020
Let's merge this for now, since the link will keep working even if the rustdoc bug is fixed. I'll open a separate issue for the rustdoc bug. @bors r+ rollup |
bors
commented
Aug 30, 2020
📌 Commit 300a007 has been approved by |
Use intra-doc links for `core/src/slice.mod.rs` partial help in rust-lang#75080 r? @jyn514 - most are using primitive types links, which cannot be used with intra links at the moment - also `std` cannot be referenced in any link, `std::ptr::NonNull` and `std::slice` could not be referenced
Use intra-doc links for `core/src/slice.mod.rs` partial help in rust-lang#75080 r? @jyn514 - most are using primitive types links, which cannot be used with intra links at the moment - also `std` cannot be referenced in any link, `std::ptr::NonNull` and `std::slice` could not be referenced
bors
commented
Aug 31, 2020
bors
commented
Aug 31, 2020
☀️ Test successful - checks-actions, checks-azure |
partial help in #75080
r? @jyn514
stdcannot be referenced in any link,std::ptr::NonNullandstd::slicecould not be referenced