File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
rustc_const_eval/src/transform/check_consts Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -990,8 +990,10 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
990990
991991 // Check to see if the type of this place can ever have a drop impl. If not, this
992992 // `Drop` terminator is frivolous.
993- let ty_needs_drop =
994- dropped_place. ty ( self . body , self . tcx ) . ty . needs_non_const_drop ( self . tcx , self . param_env ) ;
993+ let ty_needs_drop = dropped_place
994+ . ty ( self . body , self . tcx )
995+ . ty
996+ . needs_non_const_drop ( self . tcx , self . param_env ) ;
995997
996998 if !ty_needs_drop {
997999 return ;
Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ declare_lint_pass!(
8686
8787impl < ' tcx > LateLintPass < ' tcx > for DropTraitConstraints {
8888 fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx hir:: Item < ' tcx > ) {
89- use rustc_middle:: ty:: PredicateKind :: * ;
9089 use rustc_middle:: ty;
90+ use rustc_middle:: ty:: PredicateKind :: * ;
9191
9292 let predicates = cx. tcx . explicit_predicates_of ( item. def_id ) ;
9393 for & ( predicate, span) in predicates. predicates {
@@ -97,7 +97,7 @@ impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
9797 } ;
9898 if trait_predicate. constness == ty:: BoundConstness :: ConstIfConst {
9999 // `~const Drop` definitely have meanings so avoid linting here.
100- continue
100+ continue ;
101101 }
102102 let def_id = trait_predicate. trait_ref . def_id ;
103103 if cx. tcx . lang_items ( ) . drop_trait ( ) == Some ( def_id) {
You can’t perform that action at this time.
0 commit comments