about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2020-09-26 18:36:01 -0700
committerDavid Tolnay <dtolnay@gmail.com>2020-09-30 21:45:56 -0700
commitbb760b53bf7f9593c09a03e5dea28ef5f31065d7 (patch)
tree7957fc67afb34809e15279f6a1cfcdc680bdc46b
parent0dfe7b6434f6aabbe9673a891ba74c7c7922661d (diff)
downloadrust-bb760b53bf7f9593c09a03e5dea28ef5f31065d7.tar.gz
rust-bb760b53bf7f9593c09a03e5dea28ef5f31065d7.zip
Simplify defid destructor check
-rw-r--r--compiler/rustc_mir/src/transform/check_const_item_mutation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir/src/transform/check_const_item_mutation.rs b/compiler/rustc_mir/src/transform/check_const_item_mutation.rs
index aae67949945..112c25a3129 100644
--- a/compiler/rustc_mir/src/transform/check_const_item_mutation.rs
+++ b/compiler/rustc_mir/src/transform/check_const_item_mutation.rs
@@ -46,7 +46,7 @@ impl<'a, 'tcx> ConstMutationChecker<'a, 'tcx> {
         //
         //     LOG.msg = "wow";  // prints "wow"
         //
-        match self.tcx.adt_def(def_id).destructor(self.tcx) {
+        match self.tcx.adt_destructor(def_id) {
             Some(_) => None,
             None => Some(def_id),
         }