Skip to content

Commit 9408c59

Browse files
committed
[option_option]: Use span.from_expansion
1 parent a92037f commit 9408c59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustc_hir::{
1515
Body, FnDecl, FnRetTy, GenericArg, ImplItem, ImplItemKind, Item, ItemKind, Local, MutTy, QPath, TraitItem,
1616
TraitItemKind, TyKind,
1717
};
18-
use rustc_lint::{LateContext, LateLintPass, LintContext};
18+
use rustc_lint::{LateContext, LateLintPass};
1919
use rustc_session::impl_lint_pass;
2020
use rustc_span::def_id::LocalDefId;
2121
use rustc_span::Span;
@@ -392,7 +392,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
392392
}
393393

394394
fn check_field_def(&mut self, cx: &LateContext<'tcx>, field: &hir::FieldDef<'tcx>) {
395-
if rustc_middle::lint::in_external_macro(cx.sess(), field.span) {
395+
if field.span.from_expansion() {
396396
return;
397397
}
398398

0 commit comments

Comments
 (0)