diff options
| author | Corey Richardson <corey@octayn.net> | 2014-05-19 10:33:26 -0700 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2014-05-22 22:24:56 -0700 |
| commit | f122ad08a57d3e250f0c8c5036327eaa320dd4eb (patch) | |
| tree | 0a9aba6fd3702311fbbf87184ecde01cc8106e51 | |
| parent | 3f8cc1683bc08d15986c617bced79a1f3eb197d2 (diff) | |
| download | rust-f122ad08a57d3e250f0c8c5036327eaa320dd4eb.tar.gz rust-f122ad08a57d3e250f0c8c5036327eaa320dd4eb.zip | |
rustc: middle: ty: use doc comments for the tcx
| -rw-r--r-- | src/librustc/middle/ty.rs | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index 64619b636a3..62679fa222b 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<FnvHashMap<intern_key, Box<t_box_>>>, pub next_id: Cell<uint>, 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<eterized by type parameters, such as generic fns, types, or - // other items. + /// Stores the type parameters which were substituted to obtain the type + /// of this node. This only applies to nodes that refer to entities + /// param<eterized by type parameters, such as generic fns, types, or + /// other items. pub item_substs: RefCell<NodeMap<ItemSubsts>>, - // Maps from a method to the method "descriptor" + /// Maps from a method to the method "descriptor" pub methods: RefCell<DefIdMap<Rc<Method>>>, - // 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<DefIdMap<Rc<Vec<DefId>>>>, - // A cache for the trait_methods() routine + /// A cache for the trait_methods() routine pub trait_methods_cache: RefCell<DefIdMap<Rc<Vec<Rc<Method>>>>>, pub impl_trait_cache: RefCell<DefIdMap<Option<Rc<ty::TraitRef>>>>, @@ -287,64 +287,64 @@ pub struct ctxt { pub adjustments: RefCell<NodeMap<AutoAdjustment>>, pub normalized_cache: RefCell<HashMap<t, t>>, 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<DefIdMap<ast::DefId>>, pub supertraits: RefCell<DefIdMap<Rc<Vec<Rc<TraitRef>>>>>, pub superstructs: RefCell<DefIdMap<Option<ast::DefId>>>, pub struct_fields: RefCell<DefIdMap<Rc<Vec<field_ty>>>>, - // 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<DefIdMap<Rc<ItemVariances>>>, - // 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<DefIdMap<ast::DefId>>, - // 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<DefIdSet>, - // 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<DefIdMap<Rc<RefCell<Vec<ast::DefId>>>>>, - // 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<DefIdMap<Rc<RefCell<Vec<ast::DefId>>>>>, - // 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<DefIdMap<Vec<ast::DefId>>>, - // 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<NodeSet>, - // 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<NodeSet>, - // 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<DefIdSet>, - // 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<DefIdSet>, - // Borrows + /// Borrows pub upvar_borrow_map: RefCell<UpvarBorrowMap>, - // 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<DefIdMap<Option<@ast::Expr>>>, pub extern_const_variants: RefCell<DefIdMap<Option<@ast::Expr>>>, |
