Skip to content

Commit

Permalink
Remove trivial function.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Jan 7, 2020
1 parent c1afe6a commit 0d9f4fb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/librustc/ty/inhabitedness/mod.rs
Expand Up @@ -96,15 +96,11 @@ impl<'tcx> TyCtxt<'tcx> {
// ```
// 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()
}
}

Expand Down

0 comments on commit 0d9f4fb

Please sign in to comment.