Remove trivial function.

This commit is contained in:
Camille GILLOT 2020-01-05 15:52:31 +01:00
parent c1afe6a9c9
commit 0d9f4fb270

View File

@ -96,15 +96,11 @@ pub fn is_ty_uninhabited_from(self, module: DefId, ty: Ty<'tcx>) -> bool {
// ```
// forest.is_empty()
// ```
self.ty_inhabitedness_forest(ty).contains(self, module)
ty.uninhabited_from(self).contains(self, module)
}
pub fn is_ty_uninhabited_from_any_module(self, ty: Ty<'tcx>) -> bool {
!self.ty_inhabitedness_forest(ty).is_empty()
}
fn ty_inhabitedness_forest(self, ty: Ty<'tcx>) -> DefIdForest {
ty.uninhabited_from(self)
!ty.uninhabited_from(self).is_empty()
}
}