-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Warn on broken intra-doc links added to cross-crate re-exports #77276
Conversation
@GuillaumeGomez can you add an example with a broken link on the original docs, before it was re-exported? Like this: // crate1
/// [not_found]
pub fn f() {}
// crate2
pub use crate1::f; cc @rust-lang/rustdoc, this is a change in behavior and undoes #56922 |
Sure! Just to be sure: we don't want a warning in this case, right? |
I'm not sure about that. Consider the examples from #77200:
As a library author I would want to know about those I think, instead of having them silently fail. At least then you could work around it somehow. |
That said, I'm fine with only reporting lints on new documentation for now so we can get the fix in, this would unblock #77254. |
e8e41b1
to
d3784dc
Compare
d3784dc
to
9769af9
Compare
I'm wary of reporting bugs that take updating a dependency to fix. As long as it gets reported in the dependency (which will show up in CI logs!) it should be fine IMO |
Well that's the issue, some of these won't show up in the dependency. So there's no way to see them other than warning on downstream crates, and we're currently silencing those warnings. |
9769af9
to
1f80f98
Compare
Updated! |
@GuillaumeGomez just double checking - this only affects intra-doc links for now, right? Everywhere else ignores |
Only intra-doc links as far as I can tell. But all other lints are now able to run checks on them as well, as long as they want to. @bors: r=jyn514 |
📌 Commit 1f80f981ae4b56d3f91d81432c41d0b25eff2eae has been approved by |
@bors r- No, that wasn't intentional. @GuillaumeGomez can you fix that? |
So I just need to check for |
Well, I think the fix needs to happen in render, not in |
Wait, why not? Can you give me an example? |
#77276 (comment): #77193, #75855. The first one is just a rustdoc bug, but it's possible there are more like it. The second one is a legitimate difference between documenting normally and documenting as a dependency. |
e1f4847
to
31251ae
Compare
Just waiting on you then @ollie27. :) |
☔ The latest upstream changes (presumably #77519) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
#77254 is fixed so people can now fix the warnings they get from broken links :) |
31251ae
to
7e218bb
Compare
Since I removed the filter on compiler added imports, we can move on. @bors: r=jyn514,ollie27 |
📌 Commit 7e218bb has been approved by |
☀️ Test successful - checks-actions, checks-azure |
This emits
broken_intra_doc_links
for docs applied to pub use statements that point to external items and are inlined.Does not address #77200 - any existing broken links from the original crate will not show warnings.
r? @jyn514