|
9 | 9 | // except according to those terms.
|
10 | 10 |
|
11 | 11 | pub use self::Variance::*;
|
12 |
| -pub use self::DtorKind::*; |
13 | 12 | pub use self::AssociatedItemContainer::*;
|
14 | 13 | pub use self::BorrowKind::*;
|
15 | 14 | pub use self::IntVarValue::*;
|
@@ -120,21 +119,6 @@ pub struct Resolutions {
|
120 | 119 | pub maybe_unused_trait_imports: NodeSet,
|
121 | 120 | }
|
122 | 121 |
|
123 |
| -#[derive(Copy, Clone)] |
124 |
| -pub enum DtorKind { |
125 |
| - NoDtor, |
126 |
| - TraitDtor |
127 |
| -} |
128 |
| - |
129 |
| -impl DtorKind { |
130 |
| - pub fn is_present(&self) -> bool { |
131 |
| - match *self { |
132 |
| - TraitDtor => true, |
133 |
| - _ => false |
134 |
| - } |
135 |
| - } |
136 |
| -} |
137 |
| - |
138 | 122 | #[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
139 | 123 | pub enum AssociatedItemContainer {
|
140 | 124 | TraitContainer(DefId),
|
@@ -1480,7 +1464,7 @@ impl<'a, 'gcx, 'tcx> AdtDef {
|
1480 | 1464 |
|
1481 | 1465 | /// Returns whether this type has a destructor.
|
1482 | 1466 | pub fn has_dtor(&self) -> bool {
|
1483 |
| - self.dtor_kind().is_present() |
| 1467 | + self.destructor.get().is_some() |
1484 | 1468 | }
|
1485 | 1469 |
|
1486 | 1470 | /// Asserts this is a struct and returns the struct's unique
|
@@ -1543,13 +1527,6 @@ impl<'a, 'gcx, 'tcx> AdtDef {
|
1543 | 1527 | self.destructor.set(Some(dtor));
|
1544 | 1528 | }
|
1545 | 1529 |
|
1546 |
| - pub fn dtor_kind(&self) -> DtorKind { |
1547 |
| - match self.destructor.get() { |
1548 |
| - Some(_) => TraitDtor, |
1549 |
| - None => NoDtor, |
1550 |
| - } |
1551 |
| - } |
1552 |
| - |
1553 | 1530 | /// Returns a simpler type such that `Self: Sized` if and only
|
1554 | 1531 | /// if that type is Sized, or `TyErr` if this type is recursive.
|
1555 | 1532 | ///
|
|
0 commit comments