File tree 3 files changed +3
-4
lines changed
3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ fn in_impl<'tcx>(
185
185
if let ItemKind :: Impl ( item) = & item. kind;
186
186
if let Some ( of_trait) = & item. of_trait;
187
187
if let Some ( seg) = of_trait. path. segments. last( ) ;
188
- if let Some ( Res :: Def ( _, trait_id) ) = seg. res;
188
+ if let Res :: Def ( _, trait_id) = seg. res;
189
189
if trait_id == bin_op;
190
190
if let Some ( generic_args) = seg. args;
191
191
if let Some ( GenericArg :: Type ( other_ty) ) = generic_args. args. last( ) ;
Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ impl<'tcx> LateLintPass<'tcx> for RefOptionRef {
43
43
if mut_ty. mutbl == Mutability :: Not ;
44
44
if let TyKind :: Path ( ref qpath) = & mut_ty. ty. kind;
45
45
let last = last_path_segment( qpath) ;
46
- if let Some ( res) = last. res;
47
- if let Some ( def_id) = res. opt_def_id( ) ;
46
+ if let Some ( def_id) = last. res. opt_def_id( ) ;
48
47
49
48
if cx. tcx. is_diagnostic_item( sym:: Option , def_id) ;
50
49
if let Some ( params) = last_path_segment( qpath) . args ;
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ impl<'tcx> LateLintPass<'tcx> for TraitBounds {
128
128
if !bound_predicate. span. from_expansion( ) ;
129
129
if let TyKind :: Path ( QPath :: Resolved ( _, Path { segments, .. } ) ) = bound_predicate. bounded_ty. kind;
130
130
if let Some ( PathSegment {
131
- res: Some ( Res :: SelfTy { trait_: Some ( def_id) , alias_to: _ } ) , ..
131
+ res: Res :: SelfTy { trait_: Some ( def_id) , alias_to: _ } , ..
132
132
} ) = segments. first( ) ;
133
133
if let Some (
134
134
Node :: Item (
You can’t perform that action at this time.
0 commit comments