This repository was archived by the owner on May 28, 2025. It is now read-only.
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> {
990
990
991
991
// Check to see if the type of this place can ever have a drop impl. If not, this
992
992
// `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 ) ;
995
997
996
998
if !ty_needs_drop {
997
999
return ;
Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ declare_lint_pass!(
86
86
87
87
impl < ' tcx > LateLintPass < ' tcx > for DropTraitConstraints {
88
88
fn check_item ( & mut self , cx : & LateContext < ' tcx > , item : & ' tcx hir:: Item < ' tcx > ) {
89
- use rustc_middle:: ty:: PredicateKind :: * ;
90
89
use rustc_middle:: ty;
90
+ use rustc_middle:: ty:: PredicateKind :: * ;
91
91
92
92
let predicates = cx. tcx . explicit_predicates_of ( item. def_id ) ;
93
93
for & ( predicate, span) in predicates. predicates {
@@ -97,7 +97,7 @@ impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
97
97
} ;
98
98
if trait_predicate. constness == ty:: BoundConstness :: ConstIfConst {
99
99
// `~const Drop` definitely have meanings so avoid linting here.
100
- continue
100
+ continue ;
101
101
}
102
102
let def_id = trait_predicate. trait_ref . def_id ;
103
103
if cx. tcx . lang_items ( ) . drop_trait ( ) == Some ( def_id) {
You can’t perform that action at this time.
0 commit comments