@@ -195,7 +195,7 @@ impl EarlyLintPass for MiscEarly {
195
195
span_lint (
196
196
cx,
197
197
BUILTIN_TYPE_SHADOW ,
198
- ty. span ,
198
+ ty. ident . span ,
199
199
& format ! ( "This generic shadows the built-in type `{}`" , name) ,
200
200
) ;
201
201
}
@@ -209,7 +209,7 @@ impl EarlyLintPass for MiscEarly {
209
209
let type_name = npat. segments
210
210
. last ( )
211
211
. expect ( "A path must have at least one segment" )
212
- . identifier
212
+ . ident
213
213
. name ;
214
214
215
215
for field in pfields {
@@ -267,8 +267,8 @@ impl EarlyLintPass for MiscEarly {
267
267
let mut registered_names: HashMap < String , Span > = HashMap :: new ( ) ;
268
268
269
269
for arg in & decl. inputs {
270
- if let PatKind :: Ident ( _, sp_ident , None ) = arg. pat . node {
271
- let arg_name = sp_ident . node . to_string ( ) ;
270
+ if let PatKind :: Ident ( _, ident , None ) = arg. pat . node {
271
+ let arg_name = ident . name . to_string ( ) ;
272
272
273
273
if arg_name. starts_with ( '_' ) {
274
274
if let Some ( correspondence) = registered_names. get ( & arg_name[ 1 ..] ) {
@@ -328,13 +328,13 @@ impl EarlyLintPass for MiscEarly {
328
328
if let StmtKind :: Local ( ref local) = w[ 0 ] . node;
329
329
if let Option :: Some ( ref t) = local. init;
330
330
if let ExprKind :: Closure ( _, _, _, _, _) = t. node;
331
- if let PatKind :: Ident ( _, sp_ident , _) = local. pat. node;
331
+ if let PatKind :: Ident ( _, ident , _) = local. pat. node;
332
332
if let StmtKind :: Semi ( ref second) = w[ 1 ] . node;
333
333
if let ExprKind :: Assign ( _, ref call) = second. node;
334
334
if let ExprKind :: Call ( ref closure, _) = call. node;
335
335
if let ExprKind :: Path ( _, ref path) = closure. node;
336
336
then {
337
- if sp_ident . node == ( & path. segments[ 0 ] ) . identifier {
337
+ if ident == ( & path. segments[ 0 ] ) . ident {
338
338
span_lint(
339
339
cx,
340
340
REDUNDANT_CLOSURE_CALL ,
0 commit comments