Auto merge of #108128 - clubby789:builtin-derived-attr, r=jackh726
Properly check for builtin derived code Fixes #108122
This commit is contained in:
commit
21e5b941e0
8 changed files with 60 additions and 34 deletions
|
@ -259,7 +259,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
|
|||
/// for discussion).
|
||||
fn should_ignore_item(&mut self, def_id: DefId) -> bool {
|
||||
if let Some(impl_of) = self.tcx.impl_of_method(def_id) {
|
||||
if !self.tcx.has_attr(impl_of, sym::automatically_derived) {
|
||||
if !self.tcx.is_automatically_derived(impl_of) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -537,7 +537,7 @@ impl<'tcx> MissingStabilityAnnotations<'tcx> {
|
|||
// then it would be "stable" at least for the impl.
|
||||
// We gate usages of it using `feature(const_trait_impl)` anyways
|
||||
// so there is no unstable leakage
|
||||
if self.tcx.is_builtin_derive(def_id.to_def_id()) {
|
||||
if self.tcx.is_automatically_derived(def_id.to_def_id()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue