-
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
Remove doc(include)
#85457
Remove doc(include)
#85457
Conversation
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
let has_doc = attrs.iter().any(|a| { | ||
a.is_doc_comment() || a.doc_str().is_some() || a.value_str().is_some() || Self::has_include(a.meta()) | ||
a.is_doc_comment() || a.doc_str().is_some() || a.value_str().is_some() | ||
}); |
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.
FYI @rust-lang/clippy you should probably be using rustc_lint::builtin::has_doc
instead; this has a false positive and also counts things like #[path = "x"]
as doc-comments (because you only check value_str().is_some()
, not the name of the attribute). Also in general it seems nice to have all the logic in one place.
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.
Looks like a nice cleanup opportunity on the Clippy side! has_doc
would just have to be made public
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.
Sure thing, you could do both at the same time in a PR to rust-lang/rust :)
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.
I opened an issue: rust-lang/rust-clippy#7247
This comment has been minimized.
This comment has been minimized.
cafde1d
to
2ffb63e
Compare
This comment has been minimized.
This comment has been minimized.
7f2812e
to
19b8603
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is a nightly feature, so I'd say that the FCP is unneeded here. |
19b8603
to
ff01bd3
Compare
@GuillaumeGomez do you mind reviewing the rustdoc changes? They should be pretty simple since it's just deleted code. Oh, I need to add a diagnostic test for suggesting |
Not sure this is needed though. But as you prefer. Ping me once you want me to review. |
ff01bd3
to
903a183
Compare
This comment has been minimized.
This comment has been minimized.
903a183
to
f616e6b
Compare
This comment has been minimized.
This comment has been minimized.
11c6f97
to
2a68d67
Compare
This comment has been minimized.
This comment has been minimized.
2a68d67
to
95cc6b9
Compare
This comment has been minimized.
This comment has been minimized.
95cc6b9
to
d40e9aa
Compare
This comment has been minimized.
This comment has been minimized.
70a79cc
to
4b5b26b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
4b5b26b
to
15fec1f
Compare
@GuillaumeGomez this is ready for a second round of review |
Thanks for this! This was a long awaited removal. :) @bors: r+ |
📌 Commit 15fec1f has been approved by |
☀️ Test successful - checks-actions |
doc(include) was removed in rust-lang/rust#85457. Tests should now run on on both nightly and stable.
doc(include) was removed in rust-lang/rust#85457. Tests should now run on on both nightly and stable. (cherry picked from commit d96bfa2)
doc(include) was removed in rust-lang/rust#85457. Tests should now run on on both nightly and stable.
Move resolve_path to rustc_builtin_macros and make it private Fixing a FIXME introduced by `@jyn514` in rust-lang#85457
This nightly feature is redundant now that
extended_key_value_attributes
is stable (#83366). @rust-lang/rustdoc not sure if you think this needs FCP; there was already an FCP in #82539, but technically it was for deprecating, not removing the feature altogether.This should not be merged before #83366.
cc @petrochenkov