diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-05-07 12:41:15 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-05-07 12:41:15 +0200 |
| commit | 96321ed7564be5264c324a7f815766ec829fd27e (patch) | |
| tree | a17bd8ef7ce74dbae2eb0264c6131ba6d08d4501 | |
| parent | e209e85e39b4851c3ec122a45ddeabe318b2d522 (diff) | |
| download | rust-96321ed7564be5264c324a7f815766ec829fd27e.tar.gz rust-96321ed7564be5264c324a7f815766ec829fd27e.zip | |
Do not lint on explicit outlives requirements from external macros.
| -rw-r--r-- | compiler/rustc_lint/src/builtin.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs index 3564f15e210..eae7df0301b 100644 --- a/compiler/rustc_lint/src/builtin.rs +++ b/compiler/rustc_lint/src/builtin.rs @@ -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}; 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() } |
