-impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LargeEnumVariant {
- fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &Item<'_>) {
- let did = cx.tcx.hir().local_def_id(item.hir_id);
+impl<'tcx> LateLintPass<'tcx> for LargeEnumVariant {
+ fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
+ if in_external_macro(cx.tcx.sess, item.span) {
+ return;
+ }