Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 48a3ba9

Browse files
committed
fmt
1 parent f6f5180 commit 48a3ba9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

compiler/rustc_const_eval/src/transform/check_consts/check.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

compiler/rustc_lint/src/traits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ declare_lint_pass!(
8686

8787
impl<'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) {

0 commit comments

Comments
 (0)