@@ -15,10 +15,11 @@ use std::cell::Cell;
15
15
use std:: fmt;
16
16
use std:: fmt:: Debug ;
17
17
18
+ use crate :: rustc_internal:: Opaque ;
19
+
18
20
use self :: ty:: {
19
21
GenericPredicates , Generics , ImplDef , ImplTrait , Span , TraitDecl , TraitDef , Ty , TyKind ,
20
22
} ;
21
- use crate :: rustc_smir:: Tables ;
22
23
23
24
pub mod fold;
24
25
pub mod mir;
@@ -79,6 +80,8 @@ pub struct Crate {
79
80
pub is_local : bool ,
80
81
}
81
82
83
+ pub type DefKind = Opaque ;
84
+
82
85
/// Holds information about an item in the crate.
83
86
/// For now, it only stores the item DefId. Use functions inside `rustc_internal` module to
84
87
/// use this item.
@@ -161,6 +164,7 @@ pub trait Context {
161
164
/// Prints the name of given `DefId`
162
165
fn name_of_def_id ( & self , def_id : DefId ) -> String ;
163
166
167
+ fn print_span ( & self , span : Span ) -> String ;
164
168
/// `Span` of an item
165
169
fn span_of_an_item ( & mut self , def_id : DefId ) -> Span ;
166
170
@@ -169,10 +173,6 @@ pub trait Context {
169
173
170
174
/// Create a new `Ty` from scratch without information from rustc.
171
175
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 < ' _ > ) ) ;
176
176
}
177
177
178
178
// A thread local variable that stores a pointer to the tables mapping between TyCtxt
0 commit comments