-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Link for source of is_x86_feature_detected is broken #96506
Comments
Also, all source links of the macros in https://doc.rust-lang.org/nightly/std/arch/index.html are broken as well. |
Another reexport bug. :) EDIT: so in here the problem is that the |
I think the right fix is to pass -Zrustdoc-map to cargo when documenting the standard library. We already do that for the compiler docs: Line 698 in 96834f0
mentoring instructions: add that same flag to |
cc #81311, which is one way to fix this in rustdoc, but will result in a worse experience for the source view. |
This removes the explicit links to the standard library. In particular, this makes it nicer to view locally since you can set SPEC_RELATIVE=0 to make the links work. There are a bunch of changes to the actual URL because rustdoc resolves re-exports to link to the original definition instead of the re-export site. From what I can tell, everything should otherwise be the same. Not all links were able to be converted due to some limitations in rustdoc, such as: - Links to rexports from std_arch don't work due to rust-lang/rust#96506. - Links to keywords aren't supported. - Links to trait impls where the trait is not in the prelude doesn't work (they must be in scope).
This removes the explicit links to the standard library. In particular, this makes it nicer to view locally since you can set SPEC_RELATIVE=0 to make the links work. There are a bunch of changes to the actual URL because rustdoc resolves re-exports to link to the original definition instead of the re-export site. From what I can tell, everything should otherwise be the same. Not all links were able to be converted due to some limitations in rustdoc, such as: - Links to rexports from std_arch don't work due to rust-lang/rust#96506. - Links to keywords aren't supported. - Links to trait impls where the trait is not in the prelude doesn't work (they must be in scope).
I just opened a PR for this issue: #131067 And the other concern is that although this PR fixes the main issue, there is another issue: Macros here seems still not working: https://doc.rust-lang.org/nightly/std/arch/index.html#macros Actually I can investigate this second issue further in this issue or in a new issue but at first I wanna ensure that I am on the right way. |
… r=albertlarsan68 Fix std_detect links This PR aims to fix this issue: rust-lang#96506 Fixes rust-lang#96506
Rollup merge of rust-lang#131067 - ismailarilik:fix-std-detect-links, r=albertlarsan68 Fix std_detect links This PR aims to fix this issue: rust-lang#96506 Fixes rust-lang#96506
This removes the explicit links to the standard library. In particular, this makes it nicer to view locally since you can set SPEC_RELATIVE=0 to make the links work. There are a bunch of changes to the actual URL because rustdoc resolves re-exports to link to the original definition instead of the re-export site. From what I can tell, everything should otherwise be the same. Not all links were able to be converted due to some limitations in rustdoc, such as: - Links to rexports from std_arch don't work due to rust-lang/rust#96506. - Links to keywords aren't supported. - Links to trait impls where the trait is not in the prelude doesn't work (they must be in scope).
IIRC there is a broken link checker, but somehow it doesn't catch this case:
https://doc.rust-lang.org/std/macro.is_x86_feature_detected.html
https://doc.rust-lang.org/1.60.0/src/std_detect/detect/arch/x86.rs.html#18-197 which is a 404
@rustbot modify labels: A-docs
The text was updated successfully, but these errors were encountered: