about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2021-09-01 12:53:51 +0000
committerDeadbeef <ent3rm4n@gmail.com>2021-09-09 05:21:30 +0000
commit48a3ba9a335987cfae90dec92b08a8833e12ba07 (patch)
tree2d7c94a4725c65e21f70ca3f8210d392260835fb /compiler
parentf6f5180d5fef3b3a4cc8a383eb20b83716935e6a (diff)
downloadrust-48a3ba9a335987cfae90dec92b08a8833e12ba07.tar.gz
rust-48a3ba9a335987cfae90dec92b08a8833e12ba07.zip
fmt
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/check.rs6
-rw-r--r--compiler/rustc_lint/src/traits.rs4
2 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index 189e1b043b3..13345183124 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -990,8 +990,10 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
 
                 // Check to see if the type of this place can ever have a drop impl. If not, this
                 // `Drop` terminator is frivolous.
-                let ty_needs_drop =
-                    dropped_place.ty(self.body, self.tcx).ty.needs_non_const_drop(self.tcx, self.param_env);
+                let ty_needs_drop = dropped_place
+                    .ty(self.body, self.tcx)
+                    .ty
+                    .needs_non_const_drop(self.tcx, self.param_env);
 
                 if !ty_needs_drop {
                     return;
diff --git a/compiler/rustc_lint/src/traits.rs b/compiler/rustc_lint/src/traits.rs
index ac1b106f73b..5435ff1396d 100644
--- a/compiler/rustc_lint/src/traits.rs
+++ b/compiler/rustc_lint/src/traits.rs
@@ -86,8 +86,8 @@ declare_lint_pass!(
 
 impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
     fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) {
-        use rustc_middle::ty::PredicateKind::*;
         use rustc_middle::ty;
+        use rustc_middle::ty::PredicateKind::*;
 
         let predicates = cx.tcx.explicit_predicates_of(item.def_id);
         for &(predicate, span) in predicates.predicates {
@@ -97,7 +97,7 @@ impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
             };
             if trait_predicate.constness == ty::BoundConstness::ConstIfConst {
                 // `~const Drop` definitely have meanings so avoid linting here.
-                continue
+                continue;
             }
             let def_id = trait_predicate.trait_ref.def_id;
             if cx.tcx.lang_items().drop_trait() == Some(def_id) {