Rollup merge of #96812 - cjgillot:no-lint-outllives-macro, r=petrochenkov
Do not lint on explicit outlives requirements from external macros. The current implementation of the list rightfully skipped where predicates from external macros. However, if the where predicate came from the current macro but the bounds were from an external macro, the lint still fired. Closes https://github.com/rust-lang/rust/issues/96640
This commit is contained in:
commit
7b32e9304b
4 changed files with 50 additions and 1 deletions
|
@ -38,7 +38,7 @@ use rustc_hir::def::{DefKind, Res};
|
|||
use rustc_hir::def_id::{DefId, LocalDefId, LocalDefIdSet, CRATE_DEF_ID};
|
||||
use rustc_hir::{ForeignItemKind, GenericParamKind, HirId, PatKind, PredicateOrigin};
|
||||
use rustc_index::vec::Idx;
|
||||
use rustc_middle::lint::LintDiagnosticBuilder;
|
||||
use rustc_middle::lint::{in_external_macro, LintDiagnosticBuilder};
|
||||
use rustc_middle::ty::layout::{LayoutError, LayoutOf};
|
||||
use rustc_middle::ty::print::with_no_trimmed_paths;
|
||||
use rustc_middle::ty::subst::{GenericArgKind, Subst};
|
||||
|
@ -2115,6 +2115,7 @@ impl ExplicitOutlivesRequirements {
|
|||
None
|
||||
}
|
||||
})
|
||||
.filter(|(_, span)| !in_external_macro(tcx.sess, *span))
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue