@@ -30,19 +30,19 @@ pub struct StaticMethodInfo {
30
30
vis : ast:: visibility ,
31
31
}
32
32
33
- pub fn get_symbol ( cstore : @mut cstore:: CStore , def : ast:: DefId ) -> ~str {
33
+ pub fn get_symbol ( cstore : @cstore:: CStore , def : ast:: DefId ) -> ~str {
34
34
let cdata = cstore. get_crate_data ( def. crate ) . data ( ) ;
35
35
return decoder:: get_symbol ( cdata, def. node ) ;
36
36
}
37
37
38
- pub fn get_type_param_count ( cstore : @mut cstore:: CStore , def : ast:: DefId )
38
+ pub fn get_type_param_count ( cstore : @cstore:: CStore , def : ast:: DefId )
39
39
-> uint {
40
40
let cdata = cstore. get_crate_data ( def. crate ) . data ( ) ;
41
41
return decoder:: get_type_param_count ( cdata, def. node ) ;
42
42
}
43
43
44
44
/// Iterates over all the language items in the given crate.
45
- pub fn each_lang_item ( cstore : @mut cstore:: CStore ,
45
+ pub fn each_lang_item ( cstore : @cstore:: CStore ,
46
46
cnum : ast:: CrateNum ,
47
47
f : |ast:: NodeId , uint| -> bool)
48
48
-> bool {
@@ -51,7 +51,7 @@ pub fn each_lang_item(cstore: @mut cstore::CStore,
51
51
}
52
52
53
53
/// Iterates over each child of the given item.
54
- pub fn each_child_of_item ( cstore : @mut cstore:: CStore ,
54
+ pub fn each_child_of_item ( cstore : @cstore:: CStore ,
55
55
def_id : ast:: DefId ,
56
56
callback : |decoder:: DefLike ,
57
57
ast:: Ident ,
@@ -68,7 +68,7 @@ pub fn each_child_of_item(cstore: @mut cstore::CStore,
68
68
}
69
69
70
70
/// Iterates over each top-level crate item.
71
- pub fn each_top_level_item_of_crate ( cstore : @mut cstore:: CStore ,
71
+ pub fn each_top_level_item_of_crate ( cstore : @cstore:: CStore ,
72
72
cnum : ast:: CrateNum ,
73
73
callback : |decoder:: DefLike ,
74
74
ast:: Ident ,
@@ -131,21 +131,21 @@ pub fn get_method(tcx: ty::ctxt, def: ast::DefId) -> ty::Method {
131
131
decoder:: get_method ( tcx. cstore . intr , cdata, def. node , tcx)
132
132
}
133
133
134
- pub fn get_method_name_and_explicit_self ( cstore : @mut cstore:: CStore ,
134
+ pub fn get_method_name_and_explicit_self ( cstore : @cstore:: CStore ,
135
135
def : ast:: DefId )
136
136
-> ( ast:: Ident , ast:: explicit_self_ )
137
137
{
138
138
let cdata = cstore. get_crate_data ( def. crate ) ;
139
139
decoder:: get_method_name_and_explicit_self ( cstore. intr , cdata, def. node )
140
140
}
141
141
142
- pub fn get_trait_method_def_ids ( cstore : @mut cstore:: CStore ,
142
+ pub fn get_trait_method_def_ids ( cstore : @cstore:: CStore ,
143
143
def : ast:: DefId ) -> ~[ ast:: DefId ] {
144
144
let cdata = cstore. get_crate_data ( def. crate ) ;
145
145
decoder:: get_trait_method_def_ids ( cdata, def. node )
146
146
}
147
147
148
- pub fn get_item_variances ( cstore : @mut cstore:: CStore ,
148
+ pub fn get_item_variances ( cstore : @cstore:: CStore ,
149
149
def : ast:: DefId ) -> ty:: ItemVariances {
150
150
let cdata = cstore. get_crate_data ( def. crate ) ;
151
151
decoder:: get_item_variances ( cdata, def. node )
@@ -165,27 +165,27 @@ pub fn get_supertraits(tcx: ty::ctxt, def: ast::DefId) -> ~[@ty::TraitRef] {
165
165
decoder:: get_supertraits ( cdata, def. node , tcx)
166
166
}
167
167
168
- pub fn get_type_name_if_impl ( cstore : @mut cstore:: CStore , def : ast:: DefId )
168
+ pub fn get_type_name_if_impl ( cstore : @cstore:: CStore , def : ast:: DefId )
169
169
-> Option < ast:: Ident > {
170
170
let cdata = cstore. get_crate_data ( def. crate ) ;
171
171
decoder:: get_type_name_if_impl ( cdata, def. node )
172
172
}
173
173
174
- pub fn get_static_methods_if_impl ( cstore : @mut cstore:: CStore ,
174
+ pub fn get_static_methods_if_impl ( cstore : @cstore:: CStore ,
175
175
def : ast:: DefId )
176
176
-> Option < ~[ StaticMethodInfo ] > {
177
177
let cdata = cstore. get_crate_data ( def. crate ) ;
178
178
decoder:: get_static_methods_if_impl ( cstore. intr , cdata, def. node )
179
179
}
180
180
181
- pub fn get_item_attrs ( cstore : @mut cstore:: CStore ,
181
+ pub fn get_item_attrs ( cstore : @cstore:: CStore ,
182
182
def_id : ast:: DefId ,
183
183
f : |~[ @ast:: MetaItem ] |) {
184
184
let cdata = cstore. get_crate_data ( def_id. crate ) ;
185
185
decoder:: get_item_attrs ( cdata, def_id. node , f)
186
186
}
187
187
188
- pub fn get_struct_fields ( cstore : @mut cstore:: CStore ,
188
+ pub fn get_struct_fields ( cstore : @cstore:: CStore ,
189
189
def : ast:: DefId )
190
190
-> ~[ ty:: field_ty ] {
191
191
let cdata = cstore. get_crate_data ( def. crate ) ;
@@ -247,43 +247,43 @@ pub fn get_impl_vtables(tcx: ty::ctxt,
247
247
decoder:: get_impl_vtables ( cdata, def. node , tcx)
248
248
}
249
249
250
- pub fn get_impl_method ( cstore : @mut cstore:: CStore ,
250
+ pub fn get_impl_method ( cstore : @cstore:: CStore ,
251
251
def : ast:: DefId ,
252
252
mname : ast:: Ident )
253
253
-> Option < ast:: DefId > {
254
254
let cdata = cstore. get_crate_data ( def. crate ) ;
255
255
decoder:: get_impl_method ( cstore. intr , cdata, def. node , mname)
256
256
}
257
257
258
- pub fn get_item_visibility ( cstore : @mut cstore:: CStore ,
258
+ pub fn get_item_visibility ( cstore : @cstore:: CStore ,
259
259
def_id : ast:: DefId )
260
260
-> ast:: visibility {
261
261
let cdata = cstore. get_crate_data ( def_id. crate ) ;
262
262
decoder:: get_item_visibility ( cdata, def_id. node )
263
263
}
264
264
265
- pub fn get_native_libraries ( cstore : @mut cstore:: CStore ,
265
+ pub fn get_native_libraries ( cstore : @cstore:: CStore ,
266
266
crate_num : ast:: CrateNum )
267
267
-> ~[ ( cstore:: NativeLibaryKind , ~str ) ] {
268
268
let cdata = cstore. get_crate_data ( crate_num) ;
269
269
decoder:: get_native_libraries ( cdata)
270
270
}
271
271
272
- pub fn each_impl ( cstore : @mut cstore:: CStore ,
272
+ pub fn each_impl ( cstore : @cstore:: CStore ,
273
273
crate_num : ast:: CrateNum ,
274
274
callback: |ast:: DefId |) {
275
275
let cdata = cstore. get_crate_data ( crate_num) ;
276
276
decoder:: each_impl ( cdata, callback)
277
277
}
278
278
279
- pub fn each_implementation_for_type ( cstore : @mut cstore:: CStore ,
279
+ pub fn each_implementation_for_type ( cstore : @cstore:: CStore ,
280
280
def_id : ast:: DefId ,
281
281
callback: |ast:: DefId |) {
282
282
let cdata = cstore. get_crate_data ( def_id. crate ) ;
283
283
decoder:: each_implementation_for_type ( cdata, def_id. node , callback)
284
284
}
285
285
286
- pub fn each_implementation_for_trait ( cstore : @mut cstore:: CStore ,
286
+ pub fn each_implementation_for_trait ( cstore : @cstore:: CStore ,
287
287
def_id : ast:: DefId ,
288
288
callback: |ast:: DefId |) {
289
289
let cdata = cstore. get_crate_data ( def_id. crate ) ;
@@ -293,7 +293,7 @@ pub fn each_implementation_for_trait(cstore: @mut cstore::CStore,
293
293
/// If the given def ID describes a method belonging to a trait (either a
294
294
/// default method or an implementation of a trait method), returns the ID of
295
295
/// the trait that the method belongs to. Otherwise, returns `None`.
296
- pub fn get_trait_of_method ( cstore : @mut cstore:: CStore ,
296
+ pub fn get_trait_of_method ( cstore : @cstore:: CStore ,
297
297
def_id : ast:: DefId ,
298
298
tcx : ty:: ctxt )
299
299
-> Option < ast:: DefId > {
0 commit comments