Simplify defid destructor check

This commit is contained in:
David Tolnay 2020-09-26 18:36:01 -07:00
parent 0dfe7b6434
commit bb760b53bf
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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),
}