-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Use allow(unused_imports) instead of cfg(doc) for imports used only for intra-doc links #75855
Conversation
This prevents links from breaking when items are re-exported in a different crate and the original isn't being documented.
Yeah, there are currently broken links on https://doc.rust-lang.org/nightly/std/intrinsics/fn.atomic_xchg.html which this should fix. @bors r+ rollup |
📌 Commit 602dd14 has been approved by |
I'm a little confused how this slipped through CI ... the place where this breaks is when documenting a re-export in |
We're explicitly ignoring warnings from other crates: rust/src/librustdoc/passes/collect_intra_doc_links.rs Lines 952 to 954 in 5180f3d
|
Yup, that would do it. We should probably close #56922 as fixed, then. I'll make a PR with a test case. |
Use allow(unused_imports) instead of cfg(doc) for imports used only for intra-doc links This prevents links from breaking when items are re-exported in a different crate and the original isn't being documented. Spotted in rust-lang#75832 (comment) (thanks ollie!) r? @ollie27
Failed in rollup: #75862 (comment) |
@JohnTitor I pushed a commit which I hope will fix it, but I'm not sure how to test thumb targets locally ... |
well, I'll ask bors to test in the meantime and if it fails, it fails. @bors r=ollie27 rollup=iffy |
📌 Commit 5aac94a has been approved by |
@jyn514 I don't familiar with that target so let's ask bors :) |
☀️ Test successful - checks-actions, checks-azure |
This prevents links from breaking when items are re-exported in a
different crate and the original isn't being documented.
Spotted in #75832 (comment) (thanks ollie!)
r? @ollie27