From f122ad08a57d3e250f0c8c5036327eaa320dd4eb Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Mon, 19 May 2014 10:33:26 -0700 Subject: [PATCH] rustc: middle: ty: use doc comments for the tcx --- src/librustc/middle/ty.rs | 82 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 64619b636a33..62679fa222bf 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -237,8 +237,8 @@ pub enum AutoRef { /// generates so that so that it can be reused and doesn't have to be redone /// later on. pub struct ctxt { - // Specifically use a speedy hash algorithm for this hash map, it's used - // quite often. + /// Specifically use a speedy hash algorithm for this hash map, it's used + /// quite often. pub interner: RefCell>>, pub next_id: Cell, pub sess: Session, @@ -248,24 +248,24 @@ pub struct ctxt { pub region_maps: middle::region::RegionMaps, - // Stores the types for various nodes in the AST. Note that this table - // is not guaranteed to be populated until after typeck. See - // typeck::check::fn_ctxt for details. + /// Stores the types for various nodes in the AST. Note that this table + /// is not guaranteed to be populated until after typeck. See + /// typeck::check::fn_ctxt for details. pub node_types: node_type_table, - // Stores the type parameters which were substituted to obtain the type - // of this node. This only applies to nodes that refer to entities - // param>, - // Maps from a method to the method "descriptor" + /// Maps from a method to the method "descriptor" pub methods: RefCell>>, - // Maps from a trait def-id to a list of the def-ids of its methods + /// Maps from a trait def-id to a list of the def-ids of its methods pub trait_method_def_ids: RefCell>>>, - // A cache for the trait_methods() routine + /// A cache for the trait_methods() routine pub trait_methods_cache: RefCell>>>>, pub impl_trait_cache: RefCell>>>, @@ -287,64 +287,64 @@ pub struct ctxt { pub adjustments: RefCell>, pub normalized_cache: RefCell>, pub lang_items: middle::lang_items::LanguageItems, - // A mapping of fake provided method def_ids to the default implementation + /// A mapping of fake provided method def_ids to the default implementation pub provided_method_sources: RefCell>, pub supertraits: RefCell>>>>, pub superstructs: RefCell>>, pub struct_fields: RefCell>>>, - // Maps from def-id of a type or region parameter to its - // (inferred) variance. + /// Maps from def-id of a type or region parameter to its + /// (inferred) variance. pub item_variance_map: RefCell>>, - // A mapping from the def ID of an enum or struct type to the def ID - // of the method that implements its destructor. If the type is not - // present in this map, it does not have a destructor. This map is - // populated during the coherence phase of typechecking. + /// A mapping from the def ID of an enum or struct type to the def ID + /// of the method that implements its destructor. If the type is not + /// present in this map, it does not have a destructor. This map is + /// populated during the coherence phase of typechecking. pub destructor_for_type: RefCell>, - // A method will be in this list if and only if it is a destructor. + /// A method will be in this list if and only if it is a destructor. pub destructors: RefCell, - // Maps a trait onto a list of impls of that trait. + /// Maps a trait onto a list of impls of that trait. pub trait_impls: RefCell>>>>, - // Maps a DefId of a type to a list of its inherent impls. - // Contains implementations of methods that are inherent to a type. - // Methods in these implementations don't need to be exported. + /// Maps a DefId of a type to a list of its inherent impls. + /// Contains implementations of methods that are inherent to a type. + /// Methods in these implementations don't need to be exported. pub inherent_impls: RefCell>>>>, - // Maps a DefId of an impl to a list of its methods. - // Note that this contains all of the impls that we know about, - // including ones in other crates. It's not clear that this is the best - // way to do it. + /// Maps a DefId of an impl to a list of its methods. + /// Note that this contains all of the impls that we know about, + /// including ones in other crates. It's not clear that this is the best + /// way to do it. pub impl_methods: RefCell>>, - // Set of used unsafe nodes (functions or blocks). Unsafe nodes not - // present in this set can be warned about. + /// Set of used unsafe nodes (functions or blocks). Unsafe nodes not + /// present in this set can be warned about. pub used_unsafe: RefCell, - // Set of nodes which mark locals as mutable which end up getting used at - // some point. Local variable definitions not in this set can be warned - // about. + /// Set of nodes which mark locals as mutable which end up getting used at + /// some point. Local variable definitions not in this set can be warned + /// about. pub used_mut_nodes: RefCell, - // vtable resolution information for impl declarations + /// vtable resolution information for impl declarations pub impl_vtables: typeck::impl_vtable_map, - // The set of external nominal types whose implementations have been read. - // This is used for lazy resolution of methods. + /// The set of external nominal types whose implementations have been read. + /// This is used for lazy resolution of methods. pub populated_external_types: RefCell, - // The set of external traits whose implementations have been read. This - // is used for lazy resolution of traits. + /// The set of external traits whose implementations have been read. This + /// is used for lazy resolution of traits. pub populated_external_traits: RefCell, - // Borrows + /// Borrows pub upvar_borrow_map: RefCell, - // These two caches are used by const_eval when decoding external statics - // and variants that are found. + /// These two caches are used by const_eval when decoding external statics + /// and variants that are found. pub extern_const_statics: RefCell>>, pub extern_const_variants: RefCell>>,