]> git.lizzy.rs Git - rust.git/commitdiff
Remove trivial function.
authorCamille GILLOT <gillot.camille@gmail.com>
Sun, 5 Jan 2020 14:52:31 +0000 (15:52 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Tue, 7 Jan 2020 16:40:31 +0000 (17:40 +0100)
src/librustc/ty/inhabitedness/mod.rs

index 73ca0075994a517dc647bb1b37369b6448e57b41..144e3bc9c8bc6d16cb5e6962948ce2d01a29a3a2 100644 (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()
     }
 }