@@ -55,7 +55,7 @@ declare_lint!(pub LET_UNIT_VALUE, Warn,
55
55
fn check_let_unit ( cx : & Context , decl : & Decl , info : Option < & ExpnInfo > ) {
56
56
if in_macro ( cx, info) { return ; }
57
57
if let DeclLocal ( ref local) = decl. node {
58
- let bindtype = & cx. tcx . pat_ty ( & * local. pat ) . sty ;
58
+ let bindtype = & cx. tcx . pat_ty ( & local. pat ) . sty ;
59
59
if * bindtype == ty:: TyTuple ( vec ! [ ] ) {
60
60
span_lint ( cx, LET_UNIT_VALUE , decl. span , & format ! (
61
61
"this let-binding has unit value. Consider omitting `let {} =`" ,
@@ -210,7 +210,7 @@ impl LintPass for CastPass {
210
210
211
211
fn check_expr ( & mut self , cx : & Context , expr : & Expr ) {
212
212
if let ExprCast ( ref ex, _) = expr. node {
213
- let ( cast_from, cast_to) = ( cx. tcx . expr_ty ( & * ex) , cx. tcx . expr_ty ( expr) ) ;
213
+ let ( cast_from, cast_to) = ( cx. tcx . expr_ty ( ex) , cx. tcx . expr_ty ( expr) ) ;
214
214
if cast_from. is_numeric ( ) && cast_to. is_numeric ( ) && !in_external_macro ( cx, expr. span ) {
215
215
match ( cast_from. is_integral ( ) , cast_to. is_integral ( ) ) {
216
216
( true , false ) => {
@@ -263,14 +263,14 @@ impl LintPass for TypeComplexityPass {
263
263
}
264
264
265
265
fn check_struct_field ( & mut self , cx : & Context , field : & StructField ) {
266
- check_type ( cx, & * field. node . ty ) ;
266
+ check_type ( cx, & field. node . ty ) ;
267
267
}
268
268
269
269
fn check_variant ( & mut self , cx : & Context , var : & Variant , _: & Generics ) {
270
270
// StructVariant is covered by check_struct_field
271
271
if let TupleVariantKind ( ref args) = var. node . kind {
272
272
for arg in args {
273
- check_type ( cx, & * arg. ty ) ;
273
+ check_type ( cx, & arg. ty ) ;
274
274
}
275
275
}
276
276
}
@@ -312,7 +312,7 @@ impl LintPass for TypeComplexityPass {
312
312
313
313
fn check_fndecl ( cx : & Context , decl : & FnDecl ) {
314
314
for arg in & decl. inputs {
315
- check_type ( cx, & * arg. ty ) ;
315
+ check_type ( cx, & arg. ty ) ;
316
316
}
317
317
if let Return ( ref ty) = decl. output {
318
318
check_type ( cx, ty) ;
0 commit comments