-
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
Move doc(primitive)
future incompat warning to invalid_doc_attributes
#109443
Move doc(primitive)
future incompat warning to invalid_doc_attributes
#109443
Conversation
Can you make this part of the |
Good idea! |
0b35a1b
to
496c0e4
Compare
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
To make it work, I needed to update how it's handled in rustdoc and to put it behind a |
☔ The latest upstream changes (presumably #109503) made this pull request unmergeable. Please resolve the merge conflicts. |
95be665
to
7cdbc8e
Compare
Rebased. |
I don't have time for reviews right now. r? rustdoc cc @petrochenkov |
cc @petrochenkov since they worked on something similar in #109534. |
r? @notriddle |
Could not assign reviewer from: |
☔ The latest upstream changes (presumably #109769) made this pull request unmergeable. Please resolve the merge conflicts. |
7cdbc8e
to
63c85e7
Compare
@@ -264,18 +264,13 @@ impl ExternalCrate { | |||
let as_primitive = |res: Res<!>| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let as_primitive = |res: Res<!>| {
let Res::Def(DefKind::Mod, def_id) = res else { return None };
tcx.get_attrs(def_id, sym::rustc_doc_primitive).find_map(|attr| {
Some((def_id, PrimitiveType::from_symbol(attr.value_str()?)?))
})
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's much better, thanks!
@bors r+ |
📌 Commit 7167054be4f13814e6ea0d6d2735174eaf2e3f4d has been approved by It is now in the queue for this repository. |
@bors r- Broken intra-doc links. |
This comment has been minimized.
This comment has been minimized.
Shouldn't we do a crater run for this change? |
I wasn't planning to, since
|
doc(primitive)
future incompat warning into errordoc(primitive)
future incompat warning to invalid_doc_attributes
Ok, please update the PR description to reflect what the PR now does. |
@jyn514 Considering we have a warning that have been around for quite a while, I think it's ok. But do you see a reason where it could a be a problem maybe? EDIT: sorry, the page wasn't updated. notriddle already answered. :) |
7167054
to
f6035fb
Compare
Found the problem: since some parts of intra-doc link generation was moved into |
@bors r=notriddle |
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#109104 (rustdoc: Fix invalid suggestions on ambiguous intra doc links v2) - rust-lang#109443 (Move `doc(primitive)` future incompat warning to `invalid_doc_attributes`) - rust-lang#109680 (Fix subslice capture in closure) - rust-lang#109798 (fluent_messages macro: don't emit the OS error in a note) - rust-lang#109805 (Source map cleanups) - rust-lang#109818 (rustdoc: Add GUI test for jump to collapsed item) - rust-lang#109820 (rustdoc-search: update docs for comma in `?` help popover) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #88070.
It's been a while since this was turned into a "future incompatible lint" so I think we can now turn it into a hard error without problem.
r? @jyn514