-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Replace def_id_no_primitives with def_id #92342
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
Conversation
Some changes occurred in cc @camelid |
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) soon. Please see the contribution instructions for more information. |
☔ The latest upstream changes (presumably #92088) made this pull request unmergeable. Please resolve the merge conflicts. |
|
||
// FIXME(eddyb) is this `doc(hidden)` check needed? | ||
if !cx.tcx.is_doc_hidden(def_id) { | ||
if !cx.tcx.get_attrs(def_id).lists(sym::doc).has_word(sym::hidden) { |
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.
This shouldn't have changed.
map: &FxHashMap<DefId, &Type>, | ||
cleaner: &mut BadImplStripper, | ||
type_did: DefId, | ||
c: &Cache, |
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.
cx
is already passed in the parameters, so no need to add the cache
in here. Just call cx.cache
.
if i.is_struct() || i.is_enum() || i.is_union() { | ||
// FIXME(eddyb) is this `doc(hidden)` check needed? | ||
if !self.cx.tcx.is_doc_hidden(i.def_id.expect_def_id()) { | ||
if !self |
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.
This shouldn't have changed.
|
||
impl BadImplStripper { | ||
fn keep_impl(&self, ty: &Type, is_deref: bool) -> bool { | ||
fn keep_impl(&self, ty: &Type, is_deref: bool, c: &Cache) -> bool { |
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.
Please name it cache
and not just c
.
|
||
impl Eq for Attributes {} | ||
|
||
impl Hash for Attributes { |
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.
Why is this needed?
/// information can be given when a doctest fails. Sugared doc comments and "raw" doc comments are | ||
/// kept separate because of issue #42760. | ||
#[derive(Clone, PartialEq, Eq, Debug)] | ||
#[derive(Clone, PartialEq, Eq, Debug, Hash)] |
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.
Why is this needed?
Looks good overall. Just a few improvements and it'll be good to go! |
Please squash your commits too using |
You'll also need to rebase so this PR can be merged. |
this is my first PR for this repository, please let me know it has ayn question.
r?