We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1afe6a commit 0d9f4fbCopy full SHA for 0d9f4fb
src/librustc/ty/inhabitedness/mod.rs
@@ -96,15 +96,11 @@ impl<'tcx> TyCtxt<'tcx> {
96
// ```
97
// forest.is_empty()
98
99
- self.ty_inhabitedness_forest(ty).contains(self, module)
+ ty.uninhabited_from(self).contains(self, module)
100
}
101
102
pub fn is_ty_uninhabited_from_any_module(self, ty: Ty<'tcx>) -> bool {
103
- !self.ty_inhabitedness_forest(ty).is_empty()
104
- }
105
-
106
- fn ty_inhabitedness_forest(self, ty: Ty<'tcx>) -> DefIdForest {
107
- ty.uninhabited_from(self)
+ !ty.uninhabited_from(self).is_empty()
108
109
110
0 commit comments