Skip to content

Commit f122ad0

Browse files
committed
rustc: middle: ty: use doc comments for the tcx
1 parent 3f8cc16 commit f122ad0

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

src/librustc/middle/ty.rs

+41-41
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ pub enum AutoRef {
237237
/// generates so that so that it can be reused and doesn't have to be redone
238238
/// later on.
239239
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.
242242
pub interner: RefCell<FnvHashMap<intern_key, Box<t_box_>>>,
243243
pub next_id: Cell<uint>,
244244
pub sess: Session,
@@ -248,24 +248,24 @@ pub struct ctxt {
248248

249249
pub region_maps: middle::region::RegionMaps,
250250

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.
254254
pub node_types: node_type_table,
255255

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.
260260
pub item_substs: RefCell<NodeMap<ItemSubsts>>,
261261

262-
// Maps from a method to the method "descriptor"
262+
/// Maps from a method to the method "descriptor"
263263
pub methods: RefCell<DefIdMap<Rc<Method>>>,
264264

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
266266
pub trait_method_def_ids: RefCell<DefIdMap<Rc<Vec<DefId>>>>,
267267

268-
// A cache for the trait_methods() routine
268+
/// A cache for the trait_methods() routine
269269
pub trait_methods_cache: RefCell<DefIdMap<Rc<Vec<Rc<Method>>>>>,
270270

271271
pub impl_trait_cache: RefCell<DefIdMap<Option<Rc<ty::TraitRef>>>>,
@@ -287,64 +287,64 @@ pub struct ctxt {
287287
pub adjustments: RefCell<NodeMap<AutoAdjustment>>,
288288
pub normalized_cache: RefCell<HashMap<t, t>>,
289289
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
291291
pub provided_method_sources: RefCell<DefIdMap<ast::DefId>>,
292292
pub supertraits: RefCell<DefIdMap<Rc<Vec<Rc<TraitRef>>>>>,
293293
pub superstructs: RefCell<DefIdMap<Option<ast::DefId>>>,
294294
pub struct_fields: RefCell<DefIdMap<Rc<Vec<field_ty>>>>,
295295

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.
298298
pub item_variance_map: RefCell<DefIdMap<Rc<ItemVariances>>>,
299299

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.
304304
pub destructor_for_type: RefCell<DefIdMap<ast::DefId>>,
305305

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.
307307
pub destructors: RefCell<DefIdSet>,
308308

309-
// Maps a trait onto a list of impls of that trait.
309+
/// Maps a trait onto a list of impls of that trait.
310310
pub trait_impls: RefCell<DefIdMap<Rc<RefCell<Vec<ast::DefId>>>>>,
311311

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.
315315
pub inherent_impls: RefCell<DefIdMap<Rc<RefCell<Vec<ast::DefId>>>>>,
316316

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.
321321
pub impl_methods: RefCell<DefIdMap<Vec<ast::DefId>>>,
322322

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.
325325
pub used_unsafe: RefCell<NodeSet>,
326326

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.
330330
pub used_mut_nodes: RefCell<NodeSet>,
331331

332-
// vtable resolution information for impl declarations
332+
/// vtable resolution information for impl declarations
333333
pub impl_vtables: typeck::impl_vtable_map,
334334

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.
337337
pub populated_external_types: RefCell<DefIdSet>,
338338

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.
341341
pub populated_external_traits: RefCell<DefIdSet>,
342342

343-
// Borrows
343+
/// Borrows
344344
pub upvar_borrow_map: RefCell<UpvarBorrowMap>,
345345

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.
348348
pub extern_const_statics: RefCell<DefIdMap<Option<@ast::Expr>>>,
349349
pub extern_const_variants: RefCell<DefIdMap<Option<@ast::Expr>>>,
350350

0 commit comments

Comments
 (0)