From 3b4a5174c099b38fc1e71599540d13193de2467c Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Tue, 1 Apr 2014 07:11:23 -0400 Subject: [PATCH] rustc: make comments on CrateContext doc comments --- src/librustc/middle/trans/context.rs | 50 ++++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/librustc/middle/trans/context.rs b/src/librustc/middle/trans/context.rs index a7fed4fa60d..a4cc1d8444c 100644 --- a/src/librustc/middle/trans/context.rs +++ b/src/librustc/middle/trans/context.rs @@ -51,45 +51,45 @@ pub struct CrateContext { pub link_meta: LinkMeta, pub drop_glues: RefCell>, pub tydescs: RefCell>, - // Set when running emit_tydescs to enforce that no more tydescs are - // created. + /// Set when running emit_tydescs to enforce that no more tydescs are + /// created. pub finished_tydescs: Cell, - // Track mapping of external ids to local items imported for inlining + /// Track mapping of external ids to local items imported for inlining pub external: RefCell>>, - // Backwards version of the `external` map (inlined items to where they - // came from) + /// Backwards version of the `external` map (inlined items to where they + /// came from) pub external_srcs: RefCell>, - // A set of static items which cannot be inlined into other crates. This - // will pevent in IIItem() structures from being encoded into the metadata - // that is generated + /// A set of static items which cannot be inlined into other crates. This + /// will pevent in IIItem() structures from being encoded into the metadata + /// that is generated pub non_inlineable_statics: RefCell, - // Cache instances of monomorphized functions + /// Cache instances of monomorphized functions pub monomorphized: RefCell>, pub monomorphizing: RefCell>, - // Cache generated vtables + /// Cache generated vtables pub vtables: RefCell>, - // Cache of constant strings, + /// Cache of constant strings, pub const_cstr_cache: RefCell>, - // Reverse-direction for const ptrs cast from globals. - // Key is an int, cast from a ValueRef holding a *T, - // Val is a ValueRef holding a *[T]. - // - // Needed because LLVM loses pointer->pointee association - // when we ptrcast, and we have to ptrcast during translation - // of a [T] const because we form a slice, a [*T,int] pair, not - // a pointer to an LLVM array type. + /// Reverse-direction for const ptrs cast from globals. + /// Key is an int, cast from a ValueRef holding a *T, + /// Val is a ValueRef holding a *[T]. + /// + /// Needed because LLVM loses pointer->pointee association + /// when we ptrcast, and we have to ptrcast during translation + /// of a [T] const because we form a slice, a [*T,int] pair, not + /// a pointer to an LLVM array type. pub const_globals: RefCell>, - // Cache of emitted const values + /// Cache of emitted const values pub const_values: RefCell>, - // Cache of external const values + /// Cache of external const values pub extern_const_values: RefCell>, pub impl_method_cache: RefCell>, - // Cache of closure wrappers for bare fn's. + /// Cache of closure wrappers for bare fn's. pub closure_bare_wrapper_cache: RefCell>, pub lltypes: RefCell>, @@ -104,9 +104,9 @@ pub struct CrateContext { pub int_type: Type, pub opaque_vec_type: Type, pub builder: BuilderRef_res, - // Set when at least one function uses GC. Needed so that - // decl_gc_metadata knows whether to link to the module metadata, which - // is not emitted by LLVM's GC pass when no functions use GC. + /// Set when at least one function uses GC. Needed so that + /// decl_gc_metadata knows whether to link to the module metadata, which + /// is not emitted by LLVM's GC pass when no functions use GC. pub uses_gc: bool, pub dbg_cx: Option, }