From 0d9f4fb270ce09c12d04c5a913c9e89c59c713fd Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sun, 5 Jan 2020 15:52:31 +0100 Subject: [PATCH] Remove trivial function. --- src/librustc/ty/inhabitedness/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/librustc/ty/inhabitedness/mod.rs b/src/librustc/ty/inhabitedness/mod.rs index 73ca0075994..144e3bc9c8b 100644 --- a/src/librustc/ty/inhabitedness/mod.rs +++ b/src/librustc/ty/inhabitedness/mod.rs @@ -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() } }