1+ use rustc_abi:: ExternAbi ;
12use rustc_hir:: def:: { DefKind , Res } ;
23use rustc_hir:: intravisit:: FnKind ;
34use rustc_hir:: { GenericParamKind , PatKind } ;
@@ -7,7 +8,6 @@ use rustc_session::{declare_lint, declare_lint_pass};
78use rustc_span:: def_id:: LocalDefId ;
89use rustc_span:: symbol:: { Ident , sym} ;
910use rustc_span:: { BytePos , Span } ;
10- use rustc_target:: spec:: abi:: Abi ;
1111use { rustc_ast as ast, rustc_attr as attr, rustc_hir as hir} ;
1212
1313use crate :: lints:: {
@@ -397,7 +397,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase {
397397 match & fk {
398398 FnKind :: Method ( ident, sig, ..) => match method_context ( cx, id) {
399399 MethodLateContext :: PlainImpl => {
400- if sig. header . abi != Abi :: Rust && cx. tcx . has_attr ( id, sym:: no_mangle) {
400+ if sig. header . abi != ExternAbi :: Rust && cx. tcx . has_attr ( id, sym:: no_mangle) {
401401 return ;
402402 }
403403 self . check_snake_case ( cx, "method" , ident) ;
@@ -409,7 +409,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase {
409409 } ,
410410 FnKind :: ItemFn ( ident, _, header) => {
411411 // Skip foreign-ABI #[no_mangle] functions (Issue #31924)
412- if header. abi != Abi :: Rust && cx. tcx . has_attr ( id, sym:: no_mangle) {
412+ if header. abi != ExternAbi :: Rust && cx. tcx . has_attr ( id, sym:: no_mangle) {
413413 return ;
414414 }
415415 self . check_snake_case ( cx, "function" , ident) ;
0 commit comments