]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ty/sty.rs
Remove `ty_to_def_id`
[rust.git] / src / librustc / ty / sty.rs
index f93da53e0436d16f69f8ee23e76ebc737793f98d..934bf9a416a95f3e9a9f68d03a13c0976e63bd8d 100644 (file)
@@ -1767,17 +1767,6 @@ pub fn is_impl_trait(&self) -> bool {
         }
     }
 
-    pub fn ty_to_def_id(&self) -> Option<DefId> {
-        match self.sty {
-            TyDynamic(ref tt, ..) => tt.principal().map(|p| p.def_id()),
-            TyAdt(def, _) => Some(def.did),
-            TyForeign(did) => Some(did),
-            TyClosure(id, _) => Some(id),
-            TyFnDef(id, _) => Some(id),
-            _ => None,
-        }
-    }
-
     pub fn ty_adt_def(&self) -> Option<&'tcx AdtDef> {
         match self.sty {
             TyAdt(adt, _) => Some(adt),