Skip to content

Commit

Permalink
[option_option]: Use span.from_expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
cookie-s committed Mar 16, 2024
1 parent a92037f commit 9408c59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use rustc_hir::{
Body, FnDecl, FnRetTy, GenericArg, ImplItem, ImplItemKind, Item, ItemKind, Local, MutTy, QPath, TraitItem,
TraitItemKind, TyKind,
};
use rustc_lint::{LateContext, LateLintPass, LintContext};
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::impl_lint_pass;
use rustc_span::def_id::LocalDefId;
use rustc_span::Span;
Expand Down Expand Up @@ -392,7 +392,7 @@ impl<'tcx> LateLintPass<'tcx> for Types {
}

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

Expand Down

0 comments on commit 9408c59

Please sign in to comment.