diff options
| author | David Tolnay <dtolnay@gmail.com> | 2020-09-26 18:36:01 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2020-09-30 21:45:56 -0700 |
| commit | bb760b53bf7f9593c09a03e5dea28ef5f31065d7 (patch) | |
| tree | 7957fc67afb34809e15279f6a1cfcdc680bdc46b | |
| parent | 0dfe7b6434f6aabbe9673a891ba74c7c7922661d (diff) | |
| download | rust-bb760b53bf7f9593c09a03e5dea28ef5f31065d7.tar.gz rust-bb760b53bf7f9593c09a03e5dea28ef5f31065d7.zip | |
Simplify defid destructor check
| -rw-r--r-- | compiler/rustc_mir/src/transform/check_const_item_mutation.rs | 2 |
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), } |
