1
+ use rustc_abi:: ExternAbi ;
1
2
use rustc_hir:: def:: { DefKind , Res } ;
2
3
use rustc_hir:: intravisit:: FnKind ;
3
4
use rustc_hir:: { GenericParamKind , PatKind } ;
@@ -7,7 +8,6 @@ use rustc_session::{declare_lint, declare_lint_pass};
7
8
use rustc_span:: def_id:: LocalDefId ;
8
9
use rustc_span:: symbol:: { Ident , sym} ;
9
10
use rustc_span:: { BytePos , Span } ;
10
- use rustc_target:: spec:: abi:: Abi ;
11
11
use { rustc_ast as ast, rustc_attr as attr, rustc_hir as hir} ;
12
12
13
13
use crate :: lints:: {
@@ -397,7 +397,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase {
397
397
match & fk {
398
398
FnKind :: Method ( ident, sig, ..) => match method_context ( cx, id) {
399
399
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) {
401
401
return ;
402
402
}
403
403
self . check_snake_case ( cx, "method" , ident) ;
@@ -409,7 +409,7 @@ impl<'tcx> LateLintPass<'tcx> for NonSnakeCase {
409
409
} ,
410
410
FnKind :: ItemFn ( ident, _, header) => {
411
411
// 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) {
413
413
return ;
414
414
}
415
415
self . check_snake_case ( cx, "function" , ident) ;
0 commit comments