@@ -93,9 +93,9 @@ declare_clippy_lint! {
93
93
/// ```rust
94
94
/// expr.span.ctxt().outer_expn_info()
95
95
/// ```
96
- pub OUTER_EXPN_INFO ,
96
+ pub OUTER_EXPN_EXPN_INFO ,
97
97
internal,
98
- "using `cx.outer ().expn_info()` instead of `cx.outer_expn_info()`"
98
+ "using `cx.outer_expn ().expn_info()` instead of `cx.outer_expn_info()`"
99
99
}
100
100
101
101
declare_lint_pass ! ( ClippyLintsInternal => [ CLIPPY_LINTS_INTERNAL ] ) ;
@@ -280,15 +280,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CompilerLintFunctions {
280
280
281
281
pub struct OuterExpnInfoPass ;
282
282
283
- impl_lint_pass ! ( OuterExpnInfoPass => [ OUTER_EXPN_INFO ] ) ;
283
+ impl_lint_pass ! ( OuterExpnInfoPass => [ OUTER_EXPN_EXPN_INFO ] ) ;
284
284
285
285
impl < ' a , ' tcx > LateLintPass < ' a , ' tcx > for OuterExpnInfoPass {
286
286
fn check_expr ( & mut self , cx : & LateContext < ' a , ' tcx > , expr : & ' tcx hir:: Expr ) {
287
287
let ( method_names, arg_lists) = method_calls ( expr, 2 ) ;
288
288
let method_names: Vec < LocalInternedString > = method_names. iter ( ) . map ( |s| s. as_str ( ) ) . collect ( ) ;
289
289
let method_names: Vec < & str > = method_names. iter ( ) . map ( std:: convert:: AsRef :: as_ref) . collect ( ) ;
290
290
if_chain ! {
291
- if let [ "expn_info" , "outer " ] = method_names. as_slice( ) ;
291
+ if let [ "expn_info" , "outer_expn " ] = method_names. as_slice( ) ;
292
292
let args = arg_lists[ 1 ] ;
293
293
if args. len( ) == 1 ;
294
294
let self_arg = & args[ 0 ] ;
@@ -297,9 +297,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OuterExpnInfoPass {
297
297
then {
298
298
span_lint_and_sugg(
299
299
cx,
300
- OUTER_EXPN_INFO ,
300
+ OUTER_EXPN_EXPN_INFO ,
301
301
expr. span. trim_start( self_arg. span) . unwrap_or( expr. span) ,
302
- "usage of `outer ().expn_info()`" ,
302
+ "usage of `outer_expn ().expn_info()`" ,
303
303
"try" ,
304
304
".outer_expn_info()" . to_string( ) ,
305
305
Applicability :: MachineApplicable ,
0 commit comments