@@ -15,10 +15,11 @@ use std::cell::Cell;
1515use std:: fmt;
1616use std:: fmt:: Debug ;
1717
18+ use crate :: rustc_internal:: Opaque ;
19+
1820use self :: ty:: {
1921 GenericPredicates , Generics , ImplDef , ImplTrait , Span , TraitDecl , TraitDef , Ty , TyKind ,
2022} ;
21- use crate :: rustc_smir:: Tables ;
2223
2324pub mod fold;
2425pub mod mir;
@@ -79,6 +80,8 @@ pub struct Crate {
7980 pub is_local : bool ,
8081}
8182
83+ pub type DefKind = Opaque ;
84+
8285/// Holds information about an item in the crate.
8386/// For now, it only stores the item DefId. Use functions inside `rustc_internal` module to
8487/// use this item.
@@ -161,6 +164,7 @@ pub trait Context {
161164 /// Prints the name of given `DefId`
162165 fn name_of_def_id ( & self , def_id : DefId ) -> String ;
163166
167+ fn print_span ( & self , span : Span ) -> String ;
164168 /// `Span` of an item
165169 fn span_of_an_item ( & mut self , def_id : DefId ) -> Span ;
166170
@@ -169,10 +173,6 @@ pub trait Context {
169173
170174 /// Create a new `Ty` from scratch without information from rustc.
171175 fn mk_ty ( & mut self , kind : TyKind ) -> Ty ;
172-
173- /// HACK: Until we have fully stable consumers, we need an escape hatch
174- /// to get `DefId`s out of `CrateItem`s.
175- fn rustc_tables ( & mut self , f : & mut dyn FnMut ( & mut Tables < ' _ > ) ) ;
176176}
177177
178178// A thread local variable that stores a pointer to the tables mapping between TyCtxt
0 commit comments