@@ -237,8 +237,8 @@ pub enum AutoRef {
237
237
/// generates so that so that it can be reused and doesn't have to be redone
238
238
/// later on.
239
239
pub struct ctxt {
240
- // Specifically use a speedy hash algorithm for this hash map, it's used
241
- // quite often.
240
+ /// Specifically use a speedy hash algorithm for this hash map, it's used
241
+ /// quite often.
242
242
pub interner : RefCell < FnvHashMap < intern_key , Box < t_box_ > > > ,
243
243
pub next_id : Cell < uint > ,
244
244
pub sess : Session ,
@@ -248,24 +248,24 @@ pub struct ctxt {
248
248
249
249
pub region_maps : middle:: region:: RegionMaps ,
250
250
251
- // Stores the types for various nodes in the AST. Note that this table
252
- // is not guaranteed to be populated until after typeck. See
253
- // typeck::check::fn_ctxt for details.
251
+ /// Stores the types for various nodes in the AST. Note that this table
252
+ /// is not guaranteed to be populated until after typeck. See
253
+ /// typeck::check::fn_ctxt for details.
254
254
pub node_types : node_type_table ,
255
255
256
- // Stores the type parameters which were substituted to obtain the type
257
- // of this node. This only applies to nodes that refer to entities
258
- // param<eterized by type parameters, such as generic fns, types, or
259
- // other items.
256
+ /// Stores the type parameters which were substituted to obtain the type
257
+ /// of this node. This only applies to nodes that refer to entities
258
+ /// param<eterized by type parameters, such as generic fns, types, or
259
+ /// other items.
260
260
pub item_substs : RefCell < NodeMap < ItemSubsts > > ,
261
261
262
- // Maps from a method to the method "descriptor"
262
+ /// Maps from a method to the method "descriptor"
263
263
pub methods : RefCell < DefIdMap < Rc < Method > > > ,
264
264
265
- // Maps from a trait def-id to a list of the def-ids of its methods
265
+ /// Maps from a trait def-id to a list of the def-ids of its methods
266
266
pub trait_method_def_ids : RefCell < DefIdMap < Rc < Vec < DefId > > > > ,
267
267
268
- // A cache for the trait_methods() routine
268
+ /// A cache for the trait_methods() routine
269
269
pub trait_methods_cache : RefCell < DefIdMap < Rc < Vec < Rc < Method > > > > > ,
270
270
271
271
pub impl_trait_cache : RefCell < DefIdMap < Option < Rc < ty:: TraitRef > > > > ,
@@ -287,64 +287,64 @@ pub struct ctxt {
287
287
pub adjustments : RefCell < NodeMap < AutoAdjustment > > ,
288
288
pub normalized_cache : RefCell < HashMap < t , t > > ,
289
289
pub lang_items : middle:: lang_items:: LanguageItems ,
290
- // A mapping of fake provided method def_ids to the default implementation
290
+ /// A mapping of fake provided method def_ids to the default implementation
291
291
pub provided_method_sources : RefCell < DefIdMap < ast:: DefId > > ,
292
292
pub supertraits : RefCell < DefIdMap < Rc < Vec < Rc < TraitRef > > > > > ,
293
293
pub superstructs : RefCell < DefIdMap < Option < ast:: DefId > > > ,
294
294
pub struct_fields : RefCell < DefIdMap < Rc < Vec < field_ty > > > > ,
295
295
296
- // Maps from def-id of a type or region parameter to its
297
- // (inferred) variance.
296
+ /// Maps from def-id of a type or region parameter to its
297
+ /// (inferred) variance.
298
298
pub item_variance_map : RefCell < DefIdMap < Rc < ItemVariances > > > ,
299
299
300
- // A mapping from the def ID of an enum or struct type to the def ID
301
- // of the method that implements its destructor. If the type is not
302
- // present in this map, it does not have a destructor. This map is
303
- // populated during the coherence phase of typechecking.
300
+ /// A mapping from the def ID of an enum or struct type to the def ID
301
+ /// of the method that implements its destructor. If the type is not
302
+ /// present in this map, it does not have a destructor. This map is
303
+ /// populated during the coherence phase of typechecking.
304
304
pub destructor_for_type : RefCell < DefIdMap < ast:: DefId > > ,
305
305
306
- // A method will be in this list if and only if it is a destructor.
306
+ /// A method will be in this list if and only if it is a destructor.
307
307
pub destructors : RefCell < DefIdSet > ,
308
308
309
- // Maps a trait onto a list of impls of that trait.
309
+ /// Maps a trait onto a list of impls of that trait.
310
310
pub trait_impls : RefCell < DefIdMap < Rc < RefCell < Vec < ast:: DefId > > > > > ,
311
311
312
- // Maps a DefId of a type to a list of its inherent impls.
313
- // Contains implementations of methods that are inherent to a type.
314
- // Methods in these implementations don't need to be exported.
312
+ /// Maps a DefId of a type to a list of its inherent impls.
313
+ /// Contains implementations of methods that are inherent to a type.
314
+ /// Methods in these implementations don't need to be exported.
315
315
pub inherent_impls : RefCell < DefIdMap < Rc < RefCell < Vec < ast:: DefId > > > > > ,
316
316
317
- // Maps a DefId of an impl to a list of its methods.
318
- // Note that this contains all of the impls that we know about,
319
- // including ones in other crates. It's not clear that this is the best
320
- // way to do it.
317
+ /// Maps a DefId of an impl to a list of its methods.
318
+ /// Note that this contains all of the impls that we know about,
319
+ /// including ones in other crates. It's not clear that this is the best
320
+ /// way to do it.
321
321
pub impl_methods : RefCell < DefIdMap < Vec < ast:: DefId > > > ,
322
322
323
- // Set of used unsafe nodes (functions or blocks). Unsafe nodes not
324
- // present in this set can be warned about.
323
+ /// Set of used unsafe nodes (functions or blocks). Unsafe nodes not
324
+ /// present in this set can be warned about.
325
325
pub used_unsafe : RefCell < NodeSet > ,
326
326
327
- // Set of nodes which mark locals as mutable which end up getting used at
328
- // some point. Local variable definitions not in this set can be warned
329
- // about.
327
+ /// Set of nodes which mark locals as mutable which end up getting used at
328
+ /// some point. Local variable definitions not in this set can be warned
329
+ /// about.
330
330
pub used_mut_nodes : RefCell < NodeSet > ,
331
331
332
- // vtable resolution information for impl declarations
332
+ /// vtable resolution information for impl declarations
333
333
pub impl_vtables : typeck:: impl_vtable_map ,
334
334
335
- // The set of external nominal types whose implementations have been read.
336
- // This is used for lazy resolution of methods.
335
+ /// The set of external nominal types whose implementations have been read.
336
+ /// This is used for lazy resolution of methods.
337
337
pub populated_external_types : RefCell < DefIdSet > ,
338
338
339
- // The set of external traits whose implementations have been read. This
340
- // is used for lazy resolution of traits.
339
+ /// The set of external traits whose implementations have been read. This
340
+ /// is used for lazy resolution of traits.
341
341
pub populated_external_traits : RefCell < DefIdSet > ,
342
342
343
- // Borrows
343
+ /// Borrows
344
344
pub upvar_borrow_map : RefCell < UpvarBorrowMap > ,
345
345
346
- // These two caches are used by const_eval when decoding external statics
347
- // and variants that are found.
346
+ /// These two caches are used by const_eval when decoding external statics
347
+ /// and variants that are found.
348
348
pub extern_const_statics : RefCell < DefIdMap < Option < @ast:: Expr > > > ,
349
349
pub extern_const_variants : RefCell < DefIdMap < Option < @ast:: Expr > > > ,
350
350
0 commit comments