]> git.lizzy.rs Git - rust.git/commitdiff
rustc: Switch field privacy as necessary
authorAlex Crichton <alex@alexcrichton.com>
Fri, 28 Mar 2014 17:05:27 +0000 (10:05 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 31 Mar 2014 22:47:36 +0000 (15:47 -0700)
53 files changed:
src/librustc/back/archive.rs
src/librustc/back/svh.rs
src/librustc/back/target_strs.rs
src/librustc/driver/driver.rs
src/librustc/driver/session.rs
src/librustc/front/feature_gate.rs
src/librustc/lib.rs
src/librustc/lib/llvm.rs
src/librustc/metadata/common.rs
src/librustc/metadata/creader.rs
src/librustc/metadata/csearch.rs
src/librustc/metadata/cstore.rs
src/librustc/metadata/decoder.rs
src/librustc/metadata/encoder.rs
src/librustc/metadata/filesearch.rs
src/librustc/metadata/loader.rs
src/librustc/metadata/tyencode.rs
src/librustc/middle/astencode.rs
src/librustc/middle/borrowck/mod.rs
src/librustc/middle/borrowck/move_data.rs
src/librustc/middle/dataflow.rs
src/librustc/middle/freevars.rs
src/librustc/middle/graph.rs
src/librustc/middle/lang_items.rs
src/librustc/middle/lint.rs
src/librustc/middle/mem_categorization.rs
src/librustc/middle/moves.rs
src/librustc/middle/region.rs
src/librustc/middle/resolve.rs
src/librustc/middle/trans/adt.rs
src/librustc/middle/trans/base.rs
src/librustc/middle/trans/builder.rs
src/librustc/middle/trans/cabi.rs
src/librustc/middle/trans/callee.rs
src/librustc/middle/trans/cleanup.rs
src/librustc/middle/trans/common.rs
src/librustc/middle/trans/context.rs
src/librustc/middle/trans/datum.rs
src/librustc/middle/trans/debuginfo.rs
src/librustc/middle/trans/tvec.rs
src/librustc/middle/trans/type_.rs
src/librustc/middle/trans/value.rs
src/librustc/middle/ty.rs
src/librustc/middle/ty_fold.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/check/vtable.rs
src/librustc/middle/typeck/infer/combine.rs
src/librustc/middle/typeck/infer/mod.rs
src/librustc/middle/typeck/infer/region_inference/mod.rs
src/librustc/middle/typeck/infer/unify.rs
src/librustc/middle/typeck/mod.rs
src/librustc/util/sha2.rs

index 786be3798a1a01207c3d19ec51edff09f26aea81..d6173176c160b8f604a42cd40711c23a447d3621 100644 (file)
 pub static METADATA_FILENAME: &'static str = "rust.metadata.bin";
 
 pub struct Archive<'a> {
-    priv sess: &'a Session,
-    priv dst: Path,
+    sess: &'a Session,
+    dst: Path,
 }
 
 pub struct ArchiveRO {
-    priv ptr: ArchiveRef,
+    ptr: ArchiveRef,
 }
 
 fn run_ar(sess: &Session, args: &str, cwd: Option<&Path>,
index a34323d6ddc204d0ab3282fdff37d71aefce982d..a2c579d13f43875bf061606671850ed2b8e9b384 100644 (file)
@@ -54,7 +54,7 @@
 
 #[deriving(Clone, Eq)]
 pub struct Svh {
-    priv hash: ~str,
+    hash: ~str,
 }
 
 impl Svh {
index f046069bc0b5aacb4a512ba2755127e60e5b1bd4..e8cdbbdad48cd01b8e5f0b004789e3293061bd72 100644 (file)
@@ -11,9 +11,9 @@
 #![allow(non_camel_case_types)]
 
 pub struct t {
-    module_asm: ~str,
-    meta_sect_name: ~str,
-    data_layout: ~str,
-    target_triple: ~str,
-    cc_args: Vec<~str> ,
+    pub module_asm: ~str,
+    pub meta_sect_name: ~str,
+    pub data_layout: ~str,
+    pub target_triple: ~str,
+    pub cc_args: Vec<~str> ,
 }
index 28720871c8e7b49c1a9df984a3d5989c39d2a6c3..d5dba02ed28f27d28747eaa655bc0e6646af7baa 100644 (file)
@@ -270,12 +270,12 @@ pub fn phase_2_configure_and_expand(sess: &Session,
 }
 
 pub struct CrateAnalysis {
-    exp_map2: middle::resolve::ExportMap2,
-    exported_items: middle::privacy::ExportedItems,
-    public_items: middle::privacy::PublicItems,
-    ty_cx: ty::ctxt,
-    maps: astencode::Maps,
-    reachable: NodeSet,
+    pub exp_map2: middle::resolve::ExportMap2,
+    pub exported_items: middle::privacy::ExportedItems,
+    pub public_items: middle::privacy::PublicItems,
+    pub ty_cx: ty::ctxt,
+    pub maps: astencode::Maps,
+    pub reachable: NodeSet,
 }
 
 /// Run the resolution, typechecking, region checking and other
@@ -409,12 +409,12 @@ pub fn phase_3_run_analysis_passes(sess: Session,
 }
 
 pub struct CrateTranslation {
-    context: ContextRef,
-    module: ModuleRef,
-    metadata_module: ModuleRef,
-    link: LinkMeta,
-    metadata: Vec<u8> ,
-    reachable: Vec<~str> ,
+    pub context: ContextRef,
+    pub module: ModuleRef,
+    pub metadata_module: ModuleRef,
+    pub link: LinkMeta,
+    pub metadata: Vec<u8>,
+    pub reachable: Vec<~str>,
 }
 
 /// Run the translation phase to LLVM, after which the AST and analysis can
@@ -1124,9 +1124,9 @@ pub fn optgroups() -> Vec<getopts::OptGroup> {
 }
 
 pub struct OutputFilenames {
-    out_directory: Path,
-    out_filestem: ~str,
-    single_output_file: Option<Path>,
+    pub out_directory: Path,
+    pub out_filestem: ~str,
+    pub single_output_file: Option<Path>,
 }
 
 impl OutputFilenames {
index 29bf5b9c93f9d066ed9fcea025d81e888547c0cd..c2fec3871abcdbd82ed909df873f925e668c4188 100644 (file)
 use collections::HashSet;
 
 pub struct Config {
-    os: abi::Os,
-    arch: abi::Architecture,
-    target_strs: target_strs::t,
-    int_type: IntTy,
-    uint_type: UintTy,
+    pub os: abi::Os,
+    pub arch: abi::Architecture,
+    pub target_strs: target_strs::t,
+    pub int_type: IntTy,
+    pub uint_type: UintTy,
 }
 
 macro_rules! debugging_opts(
@@ -124,34 +124,34 @@ pub enum DebugInfoLevel {
 pub struct Options {
     // The crate config requested for the session, which may be combined
     // with additional crate configurations during the compile process
-    crate_types: Vec<CrateType> ,
+    pub crate_types: Vec<CrateType> ,
 
-    gc: bool,
-    optimize: OptLevel,
-    debuginfo: DebugInfoLevel,
-    lint_opts: Vec<(lint::Lint, lint::level)> ,
-    output_types: Vec<back::link::OutputType> ,
+    pub gc: bool,
+    pub optimize: OptLevel,
+    pub debuginfo: DebugInfoLevel,
+    pub lint_opts: Vec<(lint::Lint, lint::level)> ,
+    pub output_types: Vec<back::link::OutputType> ,
     // This was mutable for rustpkg, which updates search paths based on the
     // parsed code. It remains mutable in case its replacements wants to use
     // this.
-    addl_lib_search_paths: RefCell<HashSet<Path>>,
-    maybe_sysroot: Option<Path>,
-    target_triple: ~str,
+    pub addl_lib_search_paths: RefCell<HashSet<Path>>,
+    pub maybe_sysroot: Option<Path>,
+    pub target_triple: ~str,
     // User-specified cfg meta items. The compiler itself will add additional
     // items to the crate config, and during parsing the entire crate config
     // will be added to the crate AST node.  This should not be used for
     // anything except building the full crate config prior to parsing.
-    cfg: ast::CrateConfig,
-    test: bool,
-    parse_only: bool,
-    no_trans: bool,
-    no_analysis: bool,
-    debugging_opts: u64,
+    pub cfg: ast::CrateConfig,
+    pub test: bool,
+    pub parse_only: bool,
+    pub no_trans: bool,
+    pub no_analysis: bool,
+    pub debugging_opts: u64,
     /// Whether to write dependency files. It's (enabled, optional filename).
-    write_dependency_info: (bool, Option<Path>),
+    pub write_dependency_info: (bool, Option<Path>),
     /// Crate id-related things to maybe print. It's (crate_id, crate_name, crate_file_name).
-    print_metas: (bool, bool, bool),
-    cg: CodegenOptions,
+    pub print_metas: (bool, bool, bool),
+    pub cg: CodegenOptions,
 }
 
 // The type of entry function, so
@@ -174,28 +174,28 @@ pub enum CrateType {
 }
 
 pub struct Session {
-    targ_cfg: Config,
-    opts: Options,
-    cstore: metadata::cstore::CStore,
-    parse_sess: ParseSess,
+    pub targ_cfg: Config,
+    pub opts: Options,
+    pub cstore: metadata::cstore::CStore,
+    pub parse_sess: ParseSess,
     // For a library crate, this is always none
-    entry_fn: RefCell<Option<(NodeId, codemap::Span)>>,
-    entry_type: Cell<Option<EntryFnType>>,
-    macro_registrar_fn: RefCell<Option<ast::DefId>>,
-    default_sysroot: Option<Path>,
-    building_library: Cell<bool>,
+    pub entry_fn: RefCell<Option<(NodeId, codemap::Span)>>,
+    pub entry_type: Cell<Option<EntryFnType>>,
+    pub macro_registrar_fn: RefCell<Option<ast::DefId>>,
+    pub default_sysroot: Option<Path>,
+    pub building_library: Cell<bool>,
     // The name of the root source file of the crate, in the local file system. The path is always
     // expected to be absolute. `None` means that there is no source file.
-    local_crate_source_file: Option<Path>,
-    working_dir: Path,
-    lints: RefCell<NodeMap<Vec<(lint::Lint, codemap::Span, ~str)>>>,
-    node_id: Cell<ast::NodeId>,
-    crate_types: RefCell<Vec<CrateType>>,
-    features: front::feature_gate::Features,
+    pub local_crate_source_file: Option<Path>,
+    pub working_dir: Path,
+    pub lints: RefCell<NodeMap<Vec<(lint::Lint, codemap::Span, ~str)>>>,
+    pub node_id: Cell<ast::NodeId>,
+    pub crate_types: RefCell<Vec<CrateType>>,
+    pub features: front::feature_gate::Features,
 
     /// The maximum recursion limit for potentially infinitely recursive
     /// operations such as auto-dereference and monomorphization.
-    recursion_limit: Cell<uint>,
+    pub recursion_limit: Cell<uint>,
 }
 
 impl Session {
@@ -365,7 +365,7 @@ macro_rules! cgoptions(
     ($($opt:ident : $t:ty = ($init:expr, $parse:ident, $desc:expr)),* ,) =>
 (
     #[deriving(Clone)]
-    pub struct CodegenOptions { $($opt: $t),* }
+    pub struct CodegenOptions { $(pub $opt: $t),* }
 
     pub fn basic_codegen_options() -> CodegenOptions {
         CodegenOptions { $($opt: $init),* }
index c3743db8adcbb448e06e500a04b1e9f72947cd70..22de214cc12ca2c5bb9d928de509ab7dfe77f363 100644 (file)
@@ -74,7 +74,7 @@ enum Status {
 
 /// A set of features to be used by later passes.
 pub struct Features {
-    default_type_params: Cell<bool>
+    pub default_type_params: Cell<bool>
 }
 
 impl Features {
index 59b08d90ca07bde0d07f5aa4976392604937fbe2..3aac4f6b72e08fbbae4bb4ecf152306576d86884 100644 (file)
@@ -31,6 +31,9 @@
 #![feature(macro_rules, globs, struct_variant, managed_boxes, quote,
            default_type_params, phase)]
 
+#![allow(visible_private_types)] // NOTE: remove after a stage0 snap
+#![allow(unrecognized_lint)] // NOTE: remove after a stage0 snap
+
 extern crate flate;
 extern crate arena;
 extern crate syntax;
index 6f20e46a6effce8d03443fc870ac1596e6de1b05..d9e1b779e96517793a0d1e1c04e1cd7d86b529e8 100644 (file)
@@ -1878,7 +1878,7 @@ pub fn val_to_str(&self, val: ValueRef) -> ~str {
 /* Memory-managed interface to target data. */
 
 pub struct target_data_res {
-    td: TargetDataRef,
+    pub td: TargetDataRef,
 }
 
 impl Drop for target_data_res {
@@ -1896,7 +1896,7 @@ pub fn target_data_res(td: TargetDataRef) -> target_data_res {
 }
 
 pub struct TargetData {
-    lltd: TargetDataRef,
+    pub lltd: TargetDataRef,
     dtor: @target_data_res
 }
 
@@ -1914,7 +1914,7 @@ pub fn mk_target_data(string_rep: &str) -> TargetData {
 /* Memory-managed interface to pass managers. */
 
 pub struct pass_manager_res {
-    pm: PassManagerRef,
+    pub pm: PassManagerRef,
 }
 
 impl Drop for pass_manager_res {
@@ -1932,7 +1932,7 @@ pub fn pass_manager_res(pm: PassManagerRef) -> pass_manager_res {
 }
 
 pub struct PassManager {
-    llpm: PassManagerRef,
+    pub llpm: PassManagerRef,
     dtor: @pass_manager_res
 }
 
@@ -1950,7 +1950,7 @@ pub fn mk_pass_manager() -> PassManager {
 /* Memory-managed interface to object files. */
 
 pub struct ObjectFile {
-    llof: ObjectFileRef,
+    pub llof: ObjectFileRef,
 }
 
 impl ObjectFile {
@@ -1981,7 +1981,7 @@ fn drop(&mut self) {
 /* Memory-managed interface to section iterators. */
 
 pub struct section_iter_res {
-    si: SectionIteratorRef,
+    pub si: SectionIteratorRef,
 }
 
 impl Drop for section_iter_res {
@@ -1999,7 +1999,7 @@ pub fn section_iter_res(si: SectionIteratorRef) -> section_iter_res {
 }
 
 pub struct SectionIter {
-    llsi: SectionIteratorRef,
+    pub llsi: SectionIteratorRef,
     dtor: @section_iter_res
 }
 
index 5a36a610e27eb9a1ad90cec6d2d5ae587340bfa3..09d3b36321fa9a91b5fcc0afa383758bf8a3f345 100644 (file)
@@ -210,6 +210,6 @@ pub fn from_uint(value : uint) -> Option<astencode_tag> {
 
 #[deriving(Clone, Show)]
 pub struct LinkMeta {
-    crateid: CrateId,
-    crate_hash: Svh,
+    pub crateid: CrateId,
+    pub crate_hash: Svh,
 }
index 138c163d61217ce159e8585586880391db881db4..36febfc1a09ca452ecda585d9a62f209d1232f72 100644 (file)
@@ -371,7 +371,7 @@ fn resolve_crate_deps(e: &mut Env,
 }
 
 pub struct Loader<'a> {
-    priv env: Env<'a>,
+    env: Env<'a>,
 }
 
 impl<'a> Loader<'a> {
index 52c9964750ff1e27bb21d7457227f2e6fed5a5be..d840ca329387d51dc8bc97ea71d3ebb0b58ad46c 100644 (file)
 use syntax::parse::token;
 
 pub struct StaticMethodInfo {
-    ident: ast::Ident,
-    def_id: ast::DefId,
-    purity: ast::Purity,
-    vis: ast::Visibility,
+    pub ident: ast::Ident,
+    pub def_id: ast::DefId,
+    pub purity: ast::Purity,
+    pub vis: ast::Visibility,
 }
 
 pub fn get_symbol(cstore: &cstore::CStore, def: ast::DefId) -> ~str {
index f57b2610d43963f9dede386a4cafdea39c367400..62fcc4c617e619e9eb01f8385a94928f89825810 100644 (file)
@@ -37,10 +37,10 @@ pub enum MetadataBlob {
 }
 
 pub struct crate_metadata {
-    name: ~str,
-    data: MetadataBlob,
-    cnum_map: cnum_map,
-    cnum: ast::CrateNum
+    pub name: ~str,
+    pub data: MetadataBlob,
+    pub cnum_map: cnum_map,
+    pub cnum: ast::CrateNum,
 }
 
 #[deriving(Eq)]
@@ -60,18 +60,18 @@ pub enum NativeLibaryKind {
 // must be non-None.
 #[deriving(Eq, Clone)]
 pub struct CrateSource {
-    dylib: Option<Path>,
-    rlib: Option<Path>,
-    cnum: ast::CrateNum,
+    pub dylib: Option<Path>,
+    pub rlib: Option<Path>,
+    pub cnum: ast::CrateNum,
 }
 
 pub struct CStore {
-    priv metas: RefCell<HashMap<ast::CrateNum, @crate_metadata>>,
-    priv extern_mod_crate_map: RefCell<extern_mod_crate_map>,
-    priv used_crate_sources: RefCell<Vec<CrateSource> >,
-    priv used_libraries: RefCell<Vec<(~str, NativeLibaryKind)> >,
-    priv used_link_args: RefCell<Vec<~str> >,
-    intr: Rc<IdentInterner>
+    metas: RefCell<HashMap<ast::CrateNum, @crate_metadata>>,
+    extern_mod_crate_map: RefCell<extern_mod_crate_map>,
+    used_crate_sources: RefCell<Vec<CrateSource>>,
+    used_libraries: RefCell<Vec<(~str, NativeLibaryKind)>>,
+    used_link_args: RefCell<Vec<~str>>,
+    pub intr: Rc<IdentInterner>,
 }
 
 // Map from NodeId's of local extern crate statements to crate numbers
index 6cc16b0bfc91bd0419ea55a69d39cc1ff02a4f93..94941913a8b8831a1a0a8b6442768c902165c38b 100644 (file)
@@ -1108,9 +1108,9 @@ pub fn get_crate_attributes(data: &[u8]) -> Vec<ast::Attribute> {
 
 #[deriving(Clone)]
 pub struct CrateDep {
-    cnum: ast::CrateNum,
-    crate_id: CrateId,
-    hash: Svh,
+    pub cnum: ast::CrateNum,
+    pub crate_id: CrateId,
+    pub hash: Svh,
 }
 
 pub fn get_crate_deps(data: &[u8]) -> Vec<CrateDep> {
index e30a5247f7f67abacbc2290a75ec33d103269bc2..1da698beb389633b28af45016dba0b8347bbeb37 100644 (file)
@@ -69,14 +69,14 @@ pub enum InlinedItemRef<'a> {
                                      ii: InlinedItemRef|;
 
 pub struct EncodeParams<'a> {
-    diag: &'a SpanHandler,
-    tcx: &'a ty::ctxt,
-    reexports2: middle::resolve::ExportMap2,
-    item_symbols: &'a RefCell<NodeMap<~str>>,
-    non_inlineable_statics: &'a RefCell<NodeSet>,
-    link_meta: &'a LinkMeta,
-    cstore: &'a cstore::CStore,
-    encode_inlined_item: EncodeInlinedItem<'a>,
+    pub diag: &'a SpanHandler,
+    pub tcx: &'a ty::ctxt,
+    pub reexports2: middle::resolve::ExportMap2,
+    pub item_symbols: &'a RefCell<NodeMap<~str>>,
+    pub non_inlineable_statics: &'a RefCell<NodeSet>,
+    pub link_meta: &'a LinkMeta,
+    pub cstore: &'a cstore::CStore,
+    pub encode_inlined_item: EncodeInlinedItem<'a>,
 }
 
 pub struct Stats {
@@ -96,16 +96,16 @@ pub struct Stats {
 }
 
 pub struct EncodeContext<'a> {
-    diag: &'a SpanHandler,
-    tcx: &'a ty::ctxt,
-    stats: @Stats,
-    reexports2: middle::resolve::ExportMap2,
-    item_symbols: &'a RefCell<NodeMap<~str>>,
-    non_inlineable_statics: &'a RefCell<NodeSet>,
-    link_meta: &'a LinkMeta,
-    cstore: &'a cstore::CStore,
-    encode_inlined_item: EncodeInlinedItem<'a>,
-    type_abbrevs: abbrev_map,
+    pub diag: &'a SpanHandler,
+    pub tcx: &'a ty::ctxt,
+    pub stats: @Stats,
+    pub reexports2: middle::resolve::ExportMap2,
+    pub item_symbols: &'a RefCell<NodeMap<~str>>,
+    pub non_inlineable_statics: &'a RefCell<NodeSet>,
+    pub link_meta: &'a LinkMeta,
+    pub cstore: &'a cstore::CStore,
+    pub encode_inlined_item: EncodeInlinedItem<'a>,
+    pub type_abbrevs: abbrev_map,
 }
 
 fn encode_name(ebml_w: &mut Encoder, name: Name) {
index 5313473739ff7ce25e02b1c40ff5e65ebdde3d6f..468eac4d2694ce5220dee2a0b53a7a9469feac6d 100644 (file)
@@ -26,9 +26,9 @@ pub enum FileMatch { FileMatches, FileDoesntMatch }
 pub type pick<'a> = 'a |path: &Path| -> FileMatch;
 
 pub struct FileSearch<'a> {
-    sysroot: &'a Path,
-    addl_lib_search_paths: &'a RefCell<HashSet<Path>>,
-    target_triple: &'a str
+    pub sysroot: &'a Path,
+    pub addl_lib_search_paths: &'a RefCell<HashSet<Path>>,
+    pub target_triple: &'a str
 }
 
 impl<'a> FileSearch<'a> {
index 6de1bf69f6da90b314670b9f3a033de792102d43..8a3d6567c77a1b52c66475890265d87cd42ef94f 100644 (file)
@@ -46,27 +46,27 @@ pub enum Os {
 }
 
 pub struct Context<'a> {
-    sess: &'a Session,
-    span: Span,
-    ident: &'a str,
-    crate_id: &'a CrateId,
-    id_hash: &'a str,
-    hash: Option<&'a Svh>,
-    os: Os,
-    intr: Rc<IdentInterner>,
-    rejected_via_hash: bool,
+    pub sess: &'a Session,
+    pub span: Span,
+    pub ident: &'a str,
+    pub crate_id: &'a CrateId,
+    pub id_hash: &'a str,
+    pub hash: Option<&'a Svh>,
+    pub os: Os,
+    pub intr: Rc<IdentInterner>,
+    pub rejected_via_hash: bool,
 }
 
 pub struct Library {
-    dylib: Option<Path>,
-    rlib: Option<Path>,
-    metadata: MetadataBlob,
+    pub dylib: Option<Path>,
+    pub rlib: Option<Path>,
+    pub metadata: MetadataBlob,
 }
 
 pub struct ArchiveMetadata {
-    priv archive: ArchiveRO,
+    archive: ArchiveRO,
     // See comments in ArchiveMetadata::new for why this is static
-    priv data: &'static [u8],
+    data: &'static [u8],
 }
 
 // FIXME(#11857) this should be a "real" realpath
index 446e42224ddd3d41378efc5ea87184861e545be5..7e8480e4311a20b68fd6c88c0373afccfad4fb5a 100644 (file)
@@ -34,12 +34,12 @@ macro_rules! mywrite( ($wr:expr, $($arg:tt)*) => (
 ) )
 
 pub struct ctxt<'a> {
-    diag: &'a SpanHandler,
+    pub diag: &'a SpanHandler,
     // Def -> str Callback:
-    ds: fn(DefId) -> ~str,
+    pub ds: fn(DefId) -> ~str,
     // The type context.
-    tcx: &'a ty::ctxt,
-    abbrevs: abbrev_ctxt
+    pub tcx: &'a ty::ctxt,
+    pub abbrevs: abbrev_ctxt
 }
 
 // Compact string representation for ty.t values. API ty_str & parse_from_str.
index bd9d206c5b38a403dfcb8bc08f13f17e3402510b..383739a1b0320db53ecbcc7545daaf1bf8a0ebd2 100644 (file)
 
 // Auxiliary maps of things to be encoded
 pub struct Maps {
-    root_map: middle::borrowck::root_map,
-    method_map: middle::typeck::MethodMap,
-    vtable_map: middle::typeck::vtable_map,
-    capture_map: RefCell<middle::moves::CaptureMap>,
+    pub root_map: middle::borrowck::root_map,
+    pub method_map: middle::typeck::MethodMap,
+    pub vtable_map: middle::typeck::vtable_map,
+    pub capture_map: RefCell<middle::moves::CaptureMap>,
 }
 
 struct DecodeContext<'a> {
index 30b965082ca0f53953fa24bfe5144fcad76f4986..b8b05128e4c2c3b87246ae98f7385b4bc9f4f465 100644 (file)
@@ -207,8 +207,8 @@ pub struct BorrowStats {
 // is T, which is not a box.
 #[deriving(Eq, TotalEq, Hash)]
 pub struct root_map_key {
-    id: ast::NodeId,
-    derefs: uint
+    pub id: ast::NodeId,
+    pub derefs: uint
 }
 
 pub type BckResult<T> = Result<T, BckError>;
@@ -378,7 +378,7 @@ fn repr(&self, _tcx: &ty::ctxt) -> ~str {
 // uncovered after a certain number of auto-derefs.
 
 pub struct RootInfo {
-    scope: ast::NodeId,
+    pub scope: ast::NodeId,
 }
 
 pub type root_map = @RefCell<HashMap<root_map_key, RootInfo>>;
index 22bacca5485928fad632cf6720b311eb053fea05..0e18946a3a100015b8caf594910a660549933492 100644 (file)
 
 pub struct MoveData {
     /// Move paths. See section "Move paths" in `doc.rs`.
-    paths: RefCell<Vec<MovePath>>,
+    pub paths: RefCell<Vec<MovePath>>,
 
     /// Cache of loan path to move path index, for easy lookup.
-    path_map: RefCell<HashMap<@LoanPath, MovePathIndex>>,
+    pub path_map: RefCell<HashMap<@LoanPath, MovePathIndex>>,
 
     /// Each move or uninitialized variable gets an entry here.
-    moves: RefCell<Vec<Move>>,
+    pub moves: RefCell<Vec<Move>>,
 
     /// Assignments to a variable, like `x = foo`. These are assigned
     /// bits for dataflow, since we must track them to ensure that
     /// immutable variables are assigned at most once along each path.
-    var_assignments: RefCell<Vec<Assignment>>,
+    pub var_assignments: RefCell<Vec<Assignment>>,
 
     /// Assignments to a path, like `x.f = foo`. These are not
     /// assigned dataflow bits, but we track them because they still
     /// kill move bits.
-    path_assignments: RefCell<Vec<Assignment>>,
+    pub path_assignments: RefCell<Vec<Assignment>>,
 
     /// Assignments to a variable or path, like `x = foo`, but not `x += foo`.
-    assignee_ids: RefCell<HashSet<ast::NodeId>>,
+    pub assignee_ids: RefCell<HashSet<ast::NodeId>>,
 }
 
 pub struct FlowedMoveData<'a> {
-    move_data: MoveData,
+    pub move_data: MoveData,
 
-    dfcx_moves: MoveDataFlow<'a>,
+    pub dfcx_moves: MoveDataFlow<'a>,
 
     // We could (and maybe should, for efficiency) combine both move
     // and assign data flow into one, but this way it's easier to
     // distinguish the bits that correspond to moves and assignments.
-    dfcx_assign: AssignDataFlow<'a>
+    pub dfcx_assign: AssignDataFlow<'a>
 }
 
 /// Index into `MoveData.paths`, used like a pointer
@@ -97,21 +97,21 @@ fn get(&self) -> uint {
 
 pub struct MovePath {
     /// Loan path corresponding to this move path
-    loan_path: @LoanPath,
+    pub loan_path: @LoanPath,
 
     /// Parent pointer, `InvalidMovePathIndex` if root
-    parent: MovePathIndex,
+    pub parent: MovePathIndex,
 
     /// Head of linked list of moves to this path,
     /// `InvalidMoveIndex` if not moved
-    first_move: MoveIndex,
+    pub first_move: MoveIndex,
 
     /// First node in linked list of children, `InvalidMovePathIndex` if leaf
-    first_child: MovePathIndex,
+    pub first_child: MovePathIndex,
 
     /// Next node in linked list of parent's children (siblings),
     /// `InvalidMovePathIndex` if none.
-    next_sibling: MovePathIndex,
+    pub next_sibling: MovePathIndex,
 }
 
 pub enum MoveKind {
@@ -123,27 +123,27 @@ pub enum MoveKind {
 
 pub struct Move {
     /// Path being moved.
-    path: MovePathIndex,
+    pub path: MovePathIndex,
 
     /// id of node that is doing the move.
-    id: ast::NodeId,
+    pub id: ast::NodeId,
 
     /// Kind of move, for error messages.
-    kind: MoveKind,
+    pub kind: MoveKind,
 
     /// Next node in linked list of moves from `path`, or `InvalidMoveIndex`
-    next_move: MoveIndex
+    pub next_move: MoveIndex
 }
 
 pub struct Assignment {
     /// Path being assigned.
-    path: MovePathIndex,
+    pub path: MovePathIndex,
 
     /// id where assignment occurs
-    id: ast::NodeId,
+    pub id: ast::NodeId,
 
     /// span of node where assignment occurs
-    span: Span,
+    pub span: Span,
 }
 
 pub struct MoveDataFlowOperator;
index 178688917e86906539d045e6a76e51fb112bd634..2adc3e82576f2b185882cac73274b514d80bf788 100644 (file)
 
 #[deriving(Clone)]
 pub struct DataFlowContext<'a, O> {
-    priv tcx: &'a ty::ctxt,
-    priv method_map: typeck::MethodMap,
+    tcx: &'a ty::ctxt,
+    method_map: typeck::MethodMap,
 
     /// the data flow operator
-    priv oper: O,
+    oper: O,
 
     /// number of bits to propagate per id
-    priv bits_per_id: uint,
+    bits_per_id: uint,
 
     /// number of words we will use to store bits_per_id.
     /// equal to bits_per_id/uint::BITS rounded up.
-    priv words_per_id: uint,
+    words_per_id: uint,
 
     // mapping from node to bitset index.
-    priv nodeid_to_bitset: NodeMap<uint>,
+    nodeid_to_bitset: NodeMap<uint>,
 
     // Bit sets per id.  The following three fields (`gens`, `kills`,
     // and `on_entry`) all have the same structure. For each id in
@@ -54,14 +54,15 @@ pub struct DataFlowContext<'a, O> {
     // the full vector (see the method `compute_id_range()`).
 
     /// bits generated as we exit the scope `id`. Updated by `add_gen()`.
-    priv gens: Vec<uint> ,
+    gens: Vec<uint>,
 
     /// bits killed as we exit the scope `id`. Updated by `add_kill()`.
-    priv kills: Vec<uint> ,
+    kills: Vec<uint>,
 
     /// bits that are valid on entry to the scope `id`. Updated by
     /// `propagate()`.
-    priv on_entry: Vec<uint> }
+    on_entry: Vec<uint>,
+}
 
 /// Parameterization for the precise form of data flow that is used.
 pub trait DataFlowOperator {
index c2ea2f4596442da887b9fb4b5e7b46b42ea1ced1..d8851fa46f8bae96ad4bfdcff05e5746ae771b56 100644 (file)
@@ -26,8 +26,8 @@
 // (The def_upvar will already have been stripped).
 #[deriving(Encodable, Decodable)]
 pub struct freevar_entry {
-    def: ast::Def, //< The variable being accessed free.
-    span: Span     //< First span where it is accessed (there can be multiple)
+    pub def: ast::Def, //< The variable being accessed free.
+    pub span: Span     //< First span where it is accessed (there can be multiple)
 }
 pub type freevar_info = @Vec<@freevar_entry> ;
 pub type freevar_map = NodeMap<freevar_info>;
index 66539c63d53f52c0a4dc5744b31ac65994c750e2..fd27cabaf7fbab23746b66b8b5b07e44a79a4cb0 100644 (file)
 use std::uint;
 
 pub struct Graph<N,E> {
-    priv nodes: Vec<Node<N>> ,
-    priv edges: Vec<Edge<E>> ,
+    nodes: Vec<Node<N>> ,
+    edges: Vec<Edge<E>> ,
 }
 
 pub struct Node<N> {
-    priv first_edge: [EdgeIndex, ..2], // see module comment
-    data: N,
+    first_edge: [EdgeIndex, ..2], // see module comment
+    pub data: N,
 }
 
 pub struct Edge<E> {
-    priv next_edge: [EdgeIndex, ..2], // see module comment
-    priv source: NodeIndex,
-    priv target: NodeIndex,
-    data: E,
+    next_edge: [EdgeIndex, ..2], // see module comment
+    source: NodeIndex,
+    target: NodeIndex,
+    pub data: E,
 }
 
 #[deriving(Eq)]
@@ -62,7 +62,7 @@ pub struct Edge<E> {
 pub static InvalidEdgeIndex: EdgeIndex = EdgeIndex(uint::MAX);
 
 // Use a private field here to guarantee no more instances are created:
-pub struct Direction { priv repr: uint }
+pub struct Direction { repr: uint }
 pub static Outgoing: Direction = Direction { repr: 0 };
 pub static Incoming: Direction = Direction { repr: 1 };
 
index f93d90d273543f11b7025529f59c80de3e2b9cbb..86db6b6a46373a22430a8e0fcc3b9e3df4282be4 100644 (file)
@@ -47,7 +47,7 @@ pub enum LangItem {
 }
 
 pub struct LanguageItems {
-    items: Vec<Option<ast::DefId>> ,
+    pub items: Vec<Option<ast::DefId>> ,
 }
 
 impl LanguageItems {
index 85717837336e72a0ef419770710d5fb6d99a4074..97f5cca1cabb5d025465dc891db880dc12594f08 100644 (file)
@@ -135,9 +135,9 @@ pub enum level {
 
 #[deriving(Clone, Eq, Ord, TotalEq, TotalOrd)]
 pub struct LintSpec {
-    default: level,
-    lint: Lint,
-    desc: &'static str,
+    pub default: level,
+    pub lint: Lint,
+    pub desc: &'static str,
 }
 
 pub type LintDict = HashMap<&'static str, LintSpec>;
index acccbe164c35e0ec36dc362b00e9349e1355fea5..3604499add6936040caf4a8ddc109b4b937e42e0 100644 (file)
@@ -90,8 +90,8 @@ pub enum categorization {
 
 #[deriving(Eq)]
 pub struct CopiedUpvar {
-    upvar_id: ast::NodeId,
-    onceness: ast::Onceness,
+    pub upvar_id: ast::NodeId,
+    pub onceness: ast::Onceness,
 }
 
 // different kinds of pointers:
@@ -147,11 +147,11 @@ pub enum MutabilityCategory {
 // fashion. For more details, see the method `cat_pattern`
 #[deriving(Eq)]
 pub struct cmt_ {
-    id: ast::NodeId,          // id of expr/pat producing this value
-    span: Span,                // span of same expr/pat
-    cat: categorization,       // categorization of expr
-    mutbl: MutabilityCategory, // mutability of expr as lvalue
-    ty: ty::t                  // type of the expr (*see WARNING above*)
+    pub id: ast::NodeId,          // id of expr/pat producing this value
+    pub span: Span,                // span of same expr/pat
+    pub cat: categorization,       // categorization of expr
+    pub mutbl: MutabilityCategory, // mutability of expr as lvalue
+    pub ty: ty::t                  // type of the expr (*see WARNING above*)
 }
 
 pub type cmt = @cmt_;
@@ -242,7 +242,7 @@ fn span(&self) -> Span { self.span }
 }
 
 pub struct MemCategorizationContext<TYPER> {
-    typer: TYPER
+    pub typer: TYPER
 }
 
 pub type McResult<T> = Result<T, ()>;
index b6cfff5c86fb6fedb3bf958ef8cae45d4e7e2dac..f3ecfdefa75cea8b248a66540c89fac7641e31a8 100644 (file)
@@ -153,9 +153,9 @@ pub enum CaptureMode {
 
 #[deriving(Encodable, Decodable)]
 pub struct CaptureVar {
-    def: Def,         // Variable being accessed free
-    span: Span,       // Location of an access to this variable
-    mode: CaptureMode // How variable is being accessed
+    pub def: Def,         // Variable being accessed free
+    pub span: Span,       // Location of an access to this variable
+    pub mode: CaptureMode // How variable is being accessed
 }
 
 pub type CaptureMap = NodeMap<Rc<Vec<CaptureVar>>>;
@@ -163,15 +163,15 @@ pub struct CaptureVar {
 /** See the section Output on the module comment for explanation. */
 #[deriving(Clone)]
 pub struct MoveMaps {
-    moves_map: NodeSet,
+    pub moves_map: NodeSet,
     /**
      * Set of variable node-ids that are moved.
      *
-     * Note: The `moves_map` stores expression ids that are moves,
+     * pub Note: The `moves_map` stores expression ids that are moves,
      * whereas this set stores the ids of the variables that are
      * moved at some point */
-    moved_variables_set: NodeSet,
-    capture_map: CaptureMap
+    pub moved_variables_set: NodeSet,
+    pub capture_map: CaptureMap
 }
 
 #[deriving(Clone)]
index 16c513f16f3444b4665fcec4153cf2211b3e180a..247209539127cf0bdd067e0cbcc973a154522d97 100644 (file)
   for dynamic checks and/or arbitrary amounts of stack space.
 */
 pub struct RegionMaps {
-    priv scope_map: RefCell<NodeMap<ast::NodeId>>,
-    priv var_map: RefCell<NodeMap<ast::NodeId>>,
-    priv free_region_map: RefCell<HashMap<FreeRegion, Vec<FreeRegion> >>,
-    priv rvalue_scopes: RefCell<NodeMap<ast::NodeId>>,
-    priv terminating_scopes: RefCell<HashSet<ast::NodeId>>,
+    scope_map: RefCell<NodeMap<ast::NodeId>>,
+    var_map: RefCell<NodeMap<ast::NodeId>>,
+    free_region_map: RefCell<HashMap<FreeRegion, Vec<FreeRegion> >>,
+    rvalue_scopes: RefCell<NodeMap<ast::NodeId>>,
+    terminating_scopes: RefCell<HashSet<ast::NodeId>>,
 }
 
 #[deriving(Clone)]
index 5eb90f770dd5fe5818815d5f3662220d0cd99db7..3e1c1828b6c483aa2402f77bfd66863570fb3f78 100644 (file)
@@ -55,8 +55,8 @@ struct binding_info {
 pub type ExportMap2 = @RefCell<NodeMap<Vec<Export2> >>;
 
 pub struct Export2 {
-    name: ~str,        // The name of the target.
-    def_id: DefId,     // The definition of the target.
+    pub name: ~str,        // The name of the target.
+    pub def_id: DefId,     // The definition of the target.
 }
 
 // This set contains all exported definitions from external crates. The set does
@@ -73,10 +73,10 @@ pub enum LastPrivate {
     // and whether the import is in fact used for each.
     // If the Option<PrivateDep> fields are None, it means there is no defintion
     // in that namespace.
-    LastImport{value_priv: Option<PrivateDep>,
-               value_used: ImportUse,
-               type_priv: Option<PrivateDep>,
-               type_used: ImportUse},
+    LastImport{pub value_priv: Option<PrivateDep>,
+               pub value_used: ImportUse,
+               pub type_priv: Option<PrivateDep>,
+               pub type_used: ImportUse},
 }
 
 pub enum PrivateDep {
@@ -5408,11 +5408,11 @@ fn dump_module(&mut self, module_: @Module) {
 }
 
 pub struct CrateMap {
-    def_map: DefMap,
-    exp_map2: ExportMap2,
-    trait_map: TraitMap,
-    external_exports: ExternalExports,
-    last_private_map: LastPrivateMap,
+    pub def_map: DefMap,
+    pub exp_map2: ExportMap2,
+    pub trait_map: TraitMap,
+    pub external_exports: ExternalExports,
+    pub last_private_map: LastPrivateMap,
 }
 
 /// Entry point to crate resolution.
index 192453ca583da6c3590a67af7a5c815c8325bda5..c727744b4c76574170236390dfa91aa0615a83a3 100644 (file)
@@ -82,7 +82,7 @@ pub enum Repr {
      * General-case enums: for each case there is a struct, and they
      * all start with a field for the discriminant.
      */
-    General(IntType, Vec<Struct> ),
+    General(IntType, Vec<Struct>),
     /**
      * Two cases distinguished by a nullable pointer: the case with discriminant
      * `nndiscr` is represented by the struct `nonnull`, where the `ptrfield`th
@@ -94,16 +94,21 @@ pub enum Repr {
      * is represented such that `None` is a null pointer and `Some` is the
      * identity function.
      */
-    NullablePointer{ nonnull: Struct, nndiscr: Disr, ptrfield: uint,
-                     nullfields: Vec<ty::t> }
+    NullablePointer {
+        pub nonnull: Struct,
+        pub nndiscr: Disr,
+        pub ptrfield: uint,
+        pub nullfields: Vec<ty::t>,
+    }
 }
 
 /// For structs, and struct-like parts of anything fancier.
 pub struct Struct {
-    size: u64,
-    align: u64,
-    packed: bool,
-    fields: Vec<ty::t> }
+    pub size: u64,
+    pub align: u64,
+    pub packed: bool,
+    pub fields: Vec<ty::t>,
+}
 
 /**
  * Convenience for `represent_type`.  There should probably be more or
index f1aa40fac59cb31f0082f1728a623d7bc55cdf12..8ac7bd1b66b683638da3a3bc601331f78240ae09 100644 (file)
@@ -413,9 +413,9 @@ pub fn malloc_raw<'a>(bcx: &'a Block<'a>, t: ty::t, heap: heap)
 }
 
 pub struct MallocResult<'a> {
-    bcx: &'a Block<'a>,
-    smart_ptr: ValueRef,
-    body: ValueRef
+    pub bcx: &'a Block<'a>,
+    pub smart_ptr: ValueRef,
+    pub body: ValueRef
 }
 
 // malloc_general_dyn: usefully wraps malloc_raw_dyn; allocates a smart
@@ -1647,7 +1647,7 @@ pub fn trans_enum_def(ccx: &CrateContext, enum_definition: &ast::EnumDef,
 }
 
 pub struct TransItemVisitor<'a> {
-    ccx: &'a CrateContext,
+    pub ccx: &'a CrateContext,
 }
 
 impl<'a> Visitor<()> for TransItemVisitor<'a> {
index ff74fac95ff403f6e0d004cafe2e4f506f4f3a04..2703ddddc8b7fe32d094a6912929ad57cdf2ef45 100644 (file)
@@ -23,8 +23,8 @@
 use syntax::codemap::Span;
 
 pub struct Builder<'a> {
-    llbuilder: BuilderRef,
-    ccx: &'a CrateContext,
+    pub llbuilder: BuilderRef,
+    pub ccx: &'a CrateContext,
 }
 
 // This is a really awful way to get a zero-length c-string, but better (and a
index ddd9f11034d7c3f30977073bdde28faa38b791fb..9ce277a7de904691b6cd0f261f640271982cb607 100644 (file)
@@ -35,15 +35,15 @@ pub enum ArgKind {
 /// This is borrowed from clang's ABIInfo.h
 #[deriving(Clone)]
 pub struct ArgType {
-    kind: ArgKind,
+    pub kind: ArgKind,
     /// Original LLVM type
-    ty: Type,
+    pub ty: Type,
     /// Coerced LLVM Type
-    cast: option::Option<Type>,
+    pub cast: option::Option<Type>,
     /// Dummy argument, which is emitted before the real argument
-    pad: option::Option<Type>,
+    pub pad: option::Option<Type>,
     /// LLVM attribute of argument
-    attr: option::Option<Attribute>
+    pub attr: option::Option<Attribute>
 }
 
 impl ArgType {
@@ -99,10 +99,10 @@ pub fn is_ignore(&self) -> bool {
 /// comments are reverse-engineered and may be inaccurate. -NDM
 pub struct FnType {
     /// The LLVM types of each argument.
-    arg_tys: Vec<ArgType> ,
+    pub arg_tys: Vec<ArgType> ,
 
     /// LLVM return type.
-    ret_ty: ArgType,
+    pub ret_ty: ArgType,
 }
 
 pub fn compute_abi_info(ccx: &CrateContext,
index 8055d63dfff4309992a95b5e35367378d0d3e728..dae48512ac2a787b1ef454612c55855aac0b2554 100644 (file)
@@ -54,8 +54,8 @@
 use syntax::ast_map;
 
 pub struct MethodData {
-    llfn: ValueRef,
-    llself: ValueRef,
+    pub llfn: ValueRef,
+    pub llself: ValueRef,
 }
 
 pub enum CalleeData {
@@ -70,8 +70,8 @@ pub enum CalleeData {
 }
 
 pub struct Callee<'a> {
-    bcx: &'a Block<'a>,
-    data: CalleeData
+    pub bcx: &'a Block<'a>,
+    pub data: CalleeData
 }
 
 fn trans<'a>(bcx: &'a Block<'a>, expr: &ast::Expr) -> Callee<'a> {
index a977ea99ef1028ac6289c7350b7eb4887d00eb49..06869d50fc4d657bb3537228552a7f3317e93ea9 100644 (file)
@@ -42,7 +42,7 @@ pub struct CleanupScope<'a> {
 }
 
 pub struct CustomScopeIndex {
-    priv index: uint
+    index: uint
 }
 
 pub static EXIT_BREAK: uint = 0;
index 81a6b401d7aa9db67ad2ca3630a43b339063c9d3..dce4750969d19de2acc563ba3b8e50f1aeacb5f9 100644 (file)
@@ -111,12 +111,12 @@ pub fn gensym_name(name: &str) -> PathElem {
 }
 
 pub struct tydesc_info {
-    ty: ty::t,
-    tydesc: ValueRef,
-    size: ValueRef,
-    align: ValueRef,
-    name: ValueRef,
-    visit_glue: Cell<Option<ValueRef>>,
+    pub ty: ty::t,
+    pub tydesc: ValueRef,
+    pub size: ValueRef,
+    pub align: ValueRef,
+    pub name: ValueRef,
+    pub visit_glue: Cell<Option<ValueRef>>,
 }
 
 /*
@@ -146,8 +146,8 @@ pub struct tydesc_info {
  */
 
 pub struct NodeInfo {
-    id: ast::NodeId,
-    span: Span,
+    pub id: ast::NodeId,
+    pub span: Span,
 }
 
 pub fn expr_info(expr: &ast::Expr) -> NodeInfo {
@@ -155,22 +155,22 @@ pub fn expr_info(expr: &ast::Expr) -> NodeInfo {
 }
 
 pub struct Stats {
-    n_static_tydescs: Cell<uint>,
-    n_glues_created: Cell<uint>,
-    n_null_glues: Cell<uint>,
-    n_real_glues: Cell<uint>,
-    n_fns: Cell<uint>,
-    n_monos: Cell<uint>,
-    n_inlines: Cell<uint>,
-    n_closures: Cell<uint>,
-    n_llvm_insns: Cell<uint>,
-    llvm_insns: RefCell<HashMap<~str, uint>>,
+    pub n_static_tydescs: Cell<uint>,
+    pub n_glues_created: Cell<uint>,
+    pub n_null_glues: Cell<uint>,
+    pub n_real_glues: Cell<uint>,
+    pub n_fns: Cell<uint>,
+    pub n_monos: Cell<uint>,
+    pub n_inlines: Cell<uint>,
+    pub n_closures: Cell<uint>,
+    pub n_llvm_insns: Cell<uint>,
+    pub llvm_insns: RefCell<HashMap<~str, uint>>,
     // (ident, time-in-ms, llvm-instructions)
-    fn_stats: RefCell<Vec<(~str, uint, uint)> >,
+    pub fn_stats: RefCell<Vec<(~str, uint, uint)> >,
 }
 
 pub struct BuilderRef_res {
-    b: BuilderRef,
+    pub b: BuilderRef,
 }
 
 impl Drop for BuilderRef_res {
@@ -192,10 +192,10 @@ pub fn BuilderRef_res(b: BuilderRef) -> BuilderRef_res {
 // Here `self_ty` is the real type of the self parameter to this method. It
 // will only be set in the case of default methods.
 pub struct param_substs {
-    tys: Vec<ty::t> ,
-    self_ty: Option<ty::t>,
-    vtables: Option<typeck::vtable_res>,
-    self_vtables: Option<typeck::vtable_param_res>
+    pub tys: Vec<ty::t> ,
+    pub self_ty: Option<ty::t>,
+    pub vtables: Option<typeck::vtable_res>,
+    pub self_vtables: Option<typeck::vtable_param_res>
 }
 
 impl param_substs {
@@ -228,69 +228,69 @@ pub struct FunctionContext<'a> {
     // address of the first instruction in the sequence of
     // instructions for this function that will go in the .text
     // section of the executable we're generating.
-    llfn: ValueRef,
+    pub llfn: ValueRef,
 
     // The environment argument in a closure.
-    llenv: Option<ValueRef>,
+    pub llenv: Option<ValueRef>,
 
     // The place to store the return value. If the return type is immediate,
     // this is an alloca in the function. Otherwise, it's the hidden first
     // parameter to the function. After function construction, this should
     // always be Some.
-    llretptr: Cell<Option<ValueRef>>,
+    pub llretptr: Cell<Option<ValueRef>>,
 
-    entry_bcx: RefCell<Option<&'a Block<'a>>>,
+    pub entry_bcx: RefCell<Option<&'a Block<'a>>>,
 
-    // These elements: "hoisted basic blocks" containing
+    // These pub elements: "hoisted basic blocks" containing
     // administrative activities that have to happen in only one place in
     // the function, due to LLVM's quirks.
     // A marker for the place where we want to insert the function's static
     // allocas, so that LLVM will coalesce them into a single alloca call.
-    alloca_insert_pt: Cell<Option<ValueRef>>,
-    llreturn: Cell<Option<BasicBlockRef>>,
+    pub alloca_insert_pt: Cell<Option<ValueRef>>,
+    pub llreturn: Cell<Option<BasicBlockRef>>,
 
     // The a value alloca'd for calls to upcalls.rust_personality. Used when
     // outputting the resume instruction.
-    personality: Cell<Option<ValueRef>>,
+    pub personality: Cell<Option<ValueRef>>,
 
     // True if the caller expects this fn to use the out pointer to
     // return. Either way, your code should write into llretptr, but if
     // this value is false, llretptr will be a local alloca.
-    caller_expects_out_pointer: bool,
+    pub caller_expects_out_pointer: bool,
 
     // Maps arguments to allocas created for them in llallocas.
-    llargs: RefCell<NodeMap<LvalueDatum>>,
+    pub llargs: RefCell<NodeMap<LvalueDatum>>,
 
     // Maps the def_ids for local variables to the allocas created for
     // them in llallocas.
-    lllocals: RefCell<NodeMap<LvalueDatum>>,
+    pub lllocals: RefCell<NodeMap<LvalueDatum>>,
 
     // Same as above, but for closure upvars
-    llupvars: RefCell<NodeMap<ValueRef>>,
+    pub llupvars: RefCell<NodeMap<ValueRef>>,
 
     // The NodeId of the function, or -1 if it doesn't correspond to
     // a user-defined function.
-    id: ast::NodeId,
+    pub id: ast::NodeId,
 
     // If this function is being monomorphized, this contains the type
     // substitutions used.
-    param_substs: Option<@param_substs>,
+    pub param_substs: Option<@param_substs>,
 
     // The source span and nesting context where this function comes from, for
     // error reporting and symbol generation.
-    span: Option<Span>,
+    pub span: Option<Span>,
 
     // The arena that blocks are allocated from.
-    block_arena: &'a TypedArena<Block<'a>>,
+    pub block_arena: &'a TypedArena<Block<'a>>,
 
     // This function's enclosing crate context.
-    ccx: &'a CrateContext,
+    pub ccx: &'a CrateContext,
 
     // Used and maintained by the debuginfo module.
-    debug_context: debuginfo::FunctionDebugContext,
+    pub debug_context: debuginfo::FunctionDebugContext,
 
     // Cleanup scopes.
-    scopes: RefCell<Vec<cleanup::CleanupScope<'a>> >,
+    pub scopes: RefCell<Vec<cleanup::CleanupScope<'a>> >,
 }
 
 impl<'a> FunctionContext<'a> {
@@ -405,20 +405,20 @@ pub struct Block<'a> {
     // block to the function pointed to by llfn.  We insert
     // instructions into that block by way of this block context.
     // The block pointing to this one in the function's digraph.
-    llbb: BasicBlockRef,
-    terminated: Cell<bool>,
-    unreachable: Cell<bool>,
+    pub llbb: BasicBlockRef,
+    pub terminated: Cell<bool>,
+    pub unreachable: Cell<bool>,
 
     // Is this block part of a landing pad?
-    is_lpad: bool,
+    pub is_lpad: bool,
 
     // AST node-id associated with this block, if any. Used for
     // debugging purposes only.
-    opt_node_id: Option<ast::NodeId>,
+    pub opt_node_id: Option<ast::NodeId>,
 
     // The function context for the function to which this block is
     // attached.
-    fcx: &'a FunctionContext<'a>,
+    pub fcx: &'a FunctionContext<'a>,
 }
 
 impl<'a> Block<'a> {
@@ -493,8 +493,8 @@ pub fn to_str(&self) -> ~str {
 }
 
 pub struct Result<'a> {
-    bcx: &'a Block<'a>,
-    val: ValueRef
+    pub bcx: &'a Block<'a>,
+    pub val: ValueRef
 }
 
 pub fn rslt<'a>(bcx: &'a Block<'a>, val: ValueRef) -> Result<'a> {
@@ -744,8 +744,8 @@ pub fn mono_data_classify(t: ty::t) -> MonoDataClass {
 
 #[deriving(Eq, TotalEq, Hash)]
 pub struct mono_id_ {
-    def: ast::DefId,
-    params: Vec<mono_param_id> }
+    pub def: ast::DefId,
+    pub params: Vec<mono_param_id> }
 
 pub type mono_id = @mono_id_;
 
index a8ff0760eaa4b3df963b87e06f54c39387985928..a7fed4fa60d3fe728a57342006d5b971aa7f72d2 100644 (file)
 use syntax::parse::token::InternedString;
 
 pub struct CrateContext {
-    llmod: ModuleRef,
-    llcx: ContextRef,
-    metadata_llmod: ModuleRef,
-    td: TargetData,
-    tn: TypeNames,
-    externs: RefCell<ExternMap>,
-    intrinsics: HashMap<&'static str, ValueRef>,
-    item_vals: RefCell<NodeMap<ValueRef>>,
-    exp_map2: resolve::ExportMap2,
-    reachable: NodeSet,
-    item_symbols: RefCell<NodeMap<~str>>,
-    link_meta: LinkMeta,
-    drop_glues: RefCell<HashMap<ty::t, ValueRef>>,
-    tydescs: RefCell<HashMap<ty::t, @tydesc_info>>,
+    pub llmod: ModuleRef,
+    pub llcx: ContextRef,
+    pub metadata_llmod: ModuleRef,
+    pub td: TargetData,
+    pub tn: TypeNames,
+    pub externs: RefCell<ExternMap>,
+    pub intrinsics: HashMap<&'static str, ValueRef>,
+    pub item_vals: RefCell<NodeMap<ValueRef>>,
+    pub exp_map2: resolve::ExportMap2,
+    pub reachable: NodeSet,
+    pub item_symbols: RefCell<NodeMap<~str>>,
+    pub link_meta: LinkMeta,
+    pub drop_glues: RefCell<HashMap<ty::t, ValueRef>>,
+    pub tydescs: RefCell<HashMap<ty::t, @tydesc_info>>,
     // Set when running emit_tydescs to enforce that no more tydescs are
     // created.
-    finished_tydescs: Cell<bool>,
+    pub finished_tydescs: Cell<bool>,
     // Track mapping of external ids to local items imported for inlining
-    external: RefCell<DefIdMap<Option<ast::NodeId>>>,
+    pub external: RefCell<DefIdMap<Option<ast::NodeId>>>,
     // Backwards version of the `external` map (inlined items to where they
     // came from)
-    external_srcs: RefCell<NodeMap<ast::DefId>>,
+    pub external_srcs: RefCell<NodeMap<ast::DefId>>,
     // 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
-    non_inlineable_statics: RefCell<NodeSet>,
+    pub non_inlineable_statics: RefCell<NodeSet>,
     // Cache instances of monomorphized functions
-    monomorphized: RefCell<HashMap<mono_id, ValueRef>>,
-    monomorphizing: RefCell<DefIdMap<uint>>,
+    pub monomorphized: RefCell<HashMap<mono_id, ValueRef>>,
+    pub monomorphizing: RefCell<DefIdMap<uint>>,
     // Cache generated vtables
-    vtables: RefCell<HashMap<(ty::t, mono_id), ValueRef>>,
+    pub vtables: RefCell<HashMap<(ty::t, mono_id), ValueRef>>,
     // Cache of constant strings,
-    const_cstr_cache: RefCell<HashMap<InternedString, ValueRef>>,
+    pub const_cstr_cache: RefCell<HashMap<InternedString, ValueRef>>,
 
     // Reverse-direction for const ptrs cast from globals.
     // Key is an int, cast from a ValueRef holding a *T,
@@ -79,36 +79,36 @@ pub struct CrateContext {
     // 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.
-    const_globals: RefCell<HashMap<int, ValueRef>>,
+    pub const_globals: RefCell<HashMap<int, ValueRef>>,
 
     // Cache of emitted const values
-    const_values: RefCell<NodeMap<ValueRef>>,
+    pub const_values: RefCell<NodeMap<ValueRef>>,
 
     // Cache of external const values
-    extern_const_values: RefCell<DefIdMap<ValueRef>>,
+    pub extern_const_values: RefCell<DefIdMap<ValueRef>>,
 
-    impl_method_cache: RefCell<HashMap<(ast::DefId, ast::Name), ast::DefId>>,
+    pub impl_method_cache: RefCell<HashMap<(ast::DefId, ast::Name), ast::DefId>>,
 
     // Cache of closure wrappers for bare fn's.
-    closure_bare_wrapper_cache: RefCell<HashMap<ValueRef, ValueRef>>,
+    pub closure_bare_wrapper_cache: RefCell<HashMap<ValueRef, ValueRef>>,
 
-    lltypes: RefCell<HashMap<ty::t, Type>>,
-    llsizingtypes: RefCell<HashMap<ty::t, Type>>,
-    adt_reprs: RefCell<HashMap<ty::t, @adt::Repr>>,
-    symbol_hasher: RefCell<Sha256>,
-    type_hashcodes: RefCell<HashMap<ty::t, ~str>>,
-    all_llvm_symbols: RefCell<HashSet<~str>>,
-    tcx: ty::ctxt,
-    maps: astencode::Maps,
-    stats: @Stats,
-    int_type: Type,
-    opaque_vec_type: Type,
-    builder: BuilderRef_res,
+    pub lltypes: RefCell<HashMap<ty::t, Type>>,
+    pub llsizingtypes: RefCell<HashMap<ty::t, Type>>,
+    pub adt_reprs: RefCell<HashMap<ty::t, @adt::Repr>>,
+    pub symbol_hasher: RefCell<Sha256>,
+    pub type_hashcodes: RefCell<HashMap<ty::t, ~str>>,
+    pub all_llvm_symbols: RefCell<HashSet<~str>>,
+    pub tcx: ty::ctxt,
+    pub maps: astencode::Maps,
+    pub stats: @Stats,
+    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.
-    uses_gc: bool,
-    dbg_cx: Option<debuginfo::CrateDebugContext>,
+    pub uses_gc: bool,
+    pub dbg_cx: Option<debuginfo::CrateDebugContext>,
 }
 
 impl CrateContext {
index 4ca2b5a47b05e282aac8073b6ce104564e9a419d..9f48e4714d60dbdbd0b40709c83b8b24bfbee864 100644 (file)
 pub struct Datum<K> {
     /// The llvm value.  This is either a pointer to the Rust value or
     /// the value itself, depending on `kind` below.
-    val: ValueRef,
+    pub val: ValueRef,
 
     /// The rust type of the value.
-    ty: ty::t,
+    pub ty: ty::t,
 
     /// Indicates whether this is by-ref or by-value.
-    kind: K,
+    pub kind: K,
 }
 
 pub struct DatumBlock<'a, K> {
-    bcx: &'a Block<'a>,
-    datum: Datum<K>,
+    pub bcx: &'a Block<'a>,
+    pub datum: Datum<K>,
 }
 
 pub enum Expr {
@@ -70,7 +70,7 @@ pub enum Expr {
 pub struct Lvalue;
 
 pub struct Rvalue {
-    mode: RvalueMode
+    pub mode: RvalueMode
 }
 
 pub fn Rvalue(m: RvalueMode) -> Rvalue {
index a35dcaf868b2fe74ec7864565e0975df2ebc770e..8236d6efb29a85fbb195ef1eff66136ecba9229b 100644 (file)
@@ -173,15 +173,15 @@ struct List {
 
 /// A context object for maintaining all state needed by the debuginfo module.
 pub struct CrateDebugContext {
-    priv llcontext: ContextRef,
-    priv builder: DIBuilderRef,
-    priv current_debug_location: Cell<DebugLocation>,
-    priv created_files: RefCell<HashMap<~str, DIFile>>,
-    priv created_types: RefCell<HashMap<uint, DIType>>,
-    priv namespace_map: RefCell<HashMap<Vec<ast::Name> , @NamespaceTreeNode>>,
+    llcontext: ContextRef,
+    builder: DIBuilderRef,
+    current_debug_location: Cell<DebugLocation>,
+    created_files: RefCell<HashMap<~str, DIFile>>,
+    created_types: RefCell<HashMap<uint, DIType>>,
+    namespace_map: RefCell<HashMap<Vec<ast::Name> , @NamespaceTreeNode>>,
     // This collection is used to assert that composite types (structs, enums, ...) have their
     // members only set once:
-    priv composite_types_completed: RefCell<HashSet<DIType>>,
+    composite_types_completed: RefCell<HashSet<DIType>>,
 }
 
 impl CrateDebugContext {
index c30dde3a1e2fb86c2a921c21469ca15723814d3e..4aac50c5355af9c10c09d45a9b43b3c306e7aae9 100644 (file)
@@ -143,11 +143,11 @@ pub fn make_drop_glue_unboxed<'a>(
 }
 
 pub struct VecTypes {
-    vec_ty: ty::t,
-    unit_ty: ty::t,
-    llunit_ty: Type,
-    llunit_size: ValueRef,
-    llunit_alloc_size: u64
+    pub vec_ty: ty::t,
+    pub unit_ty: ty::t,
+    pub llunit_ty: Type,
+    pub llunit_size: ValueRef,
+    pub llunit_alloc_size: u64
 }
 
 impl VecTypes {
index ca6c0afc8b5e0c890f9f1d00f4d4679cb2ec52a1..ca01c0532fc39f1cac3d73bdd7d10ce168886aba 100644 (file)
@@ -26,7 +26,7 @@
 
 #[deriving(Clone, Eq, Show)]
 pub struct Type {
-    priv rf: TypeRef
+    rf: TypeRef
 }
 
 macro_rules! ty (
index 1930b4fa8b916993250c178f6c89a2b085ea1d46..f66a393a50f9d98c48b8323897aadafcff26a0b6 100644 (file)
@@ -152,7 +152,7 @@ pub fn get_next_use(self) -> Option<Use> {
 
 /// Iterator for the users of a value
 pub struct Users {
-    priv next: Option<Use>
+    next: Option<Use>
 }
 
 impl Iterator<Value> for Users {
index d179dc62df0b70d46986efeab862099e76bd07ce..8a616496f064d05fb2b3fc3ac103d8e3f44d779a 100644 (file)
@@ -63,8 +63,8 @@
 
 #[deriving(Eq, TotalEq, Hash)]
 pub struct field {
-    ident: ast::Ident,
-    mt: mt
+    pub ident: ast::Ident,
+    pub mt: mt
 }
 
 #[deriving(Clone)]
@@ -75,16 +75,16 @@ pub enum MethodContainer {
 
 #[deriving(Clone)]
 pub struct Method {
-    ident: ast::Ident,
-    generics: ty::Generics,
-    fty: BareFnTy,
-    explicit_self: ast::ExplicitSelf_,
-    vis: ast::Visibility,
-    def_id: ast::DefId,
-    container: MethodContainer,
+    pub ident: ast::Ident,
+    pub generics: ty::Generics,
+    pub fty: BareFnTy,
+    pub explicit_self: ast::ExplicitSelf_,
+    pub vis: ast::Visibility,
+    pub def_id: ast::DefId,
+    pub container: MethodContainer,
 
     // If this method is provided, we need to know where it came from
-    provided_source: Option<ast::DefId>
+    pub provided_source: Option<ast::DefId>
 }
 
 impl Method {
@@ -118,14 +118,15 @@ pub fn container_id(&self) -> ast::DefId {
 }
 
 pub struct Impl {
-    did: DefId,
-    ident: Ident,
-    methods: Vec<@Method> }
+    pub did: DefId,
+    pub ident: Ident,
+    pub methods: Vec<@Method>,
+}
 
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct mt {
-    ty: t,
-    mutbl: ast::Mutability,
+    pub ty: t,
+    pub mutbl: ast::Mutability,
 }
 
 #[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash, Show)]
@@ -142,18 +143,18 @@ pub enum TraitStore {
 }
 
 pub struct field_ty {
-    name: Name,
-    id: DefId,
-    vis: ast::Visibility,
+    pub name: Name,
+    pub id: DefId,
+    pub vis: ast::Visibility,
 }
 
 // Contains information needed to resolve types and (in the future) look up
 // the types of AST nodes.
 #[deriving(Eq, TotalEq, Hash)]
 pub struct creader_cache_key {
-    cnum: CrateNum,
-    pos: uint,
-    len: uint
+    pub cnum: CrateNum,
+    pub pos: uint,
+    pub len: uint
 }
 
 pub type creader_cache = RefCell<HashMap<creader_cache_key, t>>;
@@ -191,9 +192,9 @@ pub enum ast_ty_to_ty_cache_entry {
 
 #[deriving(Clone, Eq, Decodable, Encodable)]
 pub struct ItemVariances {
-    self_param: Option<Variance>,
-    type_params: OwnedSlice<Variance>,
-    region_params: OwnedSlice<Variance>
+    pub self_param: Option<Variance>,
+    pub type_params: OwnedSlice<Variance>,
+    pub region_params: OwnedSlice<Variance>
 }
 
 #[deriving(Clone, Eq, Decodable, Encodable, Show)]
@@ -216,8 +217,8 @@ pub enum AutoAdjustment {
 
 #[deriving(Decodable, Encodable)]
 pub struct AutoDerefRef {
-    autoderefs: uint,
-    autoref: Option<AutoRef>
+    pub autoderefs: uint,
+    pub autoref: Option<AutoRef>
 }
 
 #[deriving(Decodable, Encodable, Eq, Show)]
@@ -247,112 +248,112 @@ pub enum AutoRef {
 pub struct ctxt {
     // Specifically use a speedy hash algorithm for this hash map, it's used
     // quite often.
-    interner: RefCell<FnvHashMap<intern_key, ~t_box_>>,
-    next_id: Cell<uint>,
-    sess: Session,
-    def_map: resolve::DefMap,
+    pub interner: RefCell<FnvHashMap<intern_key, ~t_box_>>,
+    pub next_id: Cell<uint>,
+    pub sess: Session,
+    pub def_map: resolve::DefMap,
 
-    named_region_map: resolve_lifetime::NamedRegionMap,
+    pub named_region_map: resolve_lifetime::NamedRegionMap,
 
-    region_maps: middle::region::RegionMaps,
+    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.
-    node_types: node_type_table,
+    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
     // parameterized by type parameters, such as generic fns, types, or
     // other items.
-    node_type_substs: RefCell<NodeMap<Vec<t>>>,
+    pub node_type_substs: RefCell<NodeMap<Vec<t>>>,
 
     // Maps from a method to the method "descriptor"
-    methods: RefCell<DefIdMap<@Method>>,
+    pub methods: RefCell<DefIdMap<@Method>>,
 
     // Maps from a trait def-id to a list of the def-ids of its methods
-    trait_method_def_ids: RefCell<DefIdMap<@Vec<DefId> >>,
+    pub trait_method_def_ids: RefCell<DefIdMap<@Vec<DefId> >>,
 
     // A cache for the trait_methods() routine
-    trait_methods_cache: RefCell<DefIdMap<@Vec<@Method> >>,
-
-    impl_trait_cache: RefCell<DefIdMap<Option<@ty::TraitRef>>>,
-
-    trait_refs: RefCell<NodeMap<@TraitRef>>,
-    trait_defs: RefCell<DefIdMap<@TraitDef>>,
-
-    map: ast_map::Map,
-    intrinsic_defs: RefCell<DefIdMap<t>>,
-    freevars: RefCell<freevars::freevar_map>,
-    tcache: type_cache,
-    rcache: creader_cache,
-    short_names_cache: RefCell<HashMap<t, ~str>>,
-    needs_unwind_cleanup_cache: RefCell<HashMap<t, bool>>,
-    tc_cache: RefCell<HashMap<uint, TypeContents>>,
-    ast_ty_to_ty_cache: RefCell<NodeMap<ast_ty_to_ty_cache_entry>>,
-    enum_var_cache: RefCell<DefIdMap<@Vec<@VariantInfo> >>,
-    ty_param_defs: RefCell<NodeMap<TypeParameterDef>>,
-    adjustments: RefCell<NodeMap<@AutoAdjustment>>,
-    normalized_cache: RefCell<HashMap<t, t>>,
-    lang_items: @middle::lang_items::LanguageItems,
+    pub trait_methods_cache: RefCell<DefIdMap<@Vec<@Method> >>,
+
+    pub impl_trait_cache: RefCell<DefIdMap<Option<@ty::TraitRef>>>,
+
+    pub trait_refs: RefCell<NodeMap<@TraitRef>>,
+    pub trait_defs: RefCell<DefIdMap<@TraitDef>>,
+
+    pub map: ast_map::Map,
+    pub intrinsic_defs: RefCell<DefIdMap<t>>,
+    pub freevars: RefCell<freevars::freevar_map>,
+    pub tcache: type_cache,
+    pub rcache: creader_cache,
+    pub short_names_cache: RefCell<HashMap<t, ~str>>,
+    pub needs_unwind_cleanup_cache: RefCell<HashMap<t, bool>>,
+    pub tc_cache: RefCell<HashMap<uint, TypeContents>>,
+    pub ast_ty_to_ty_cache: RefCell<NodeMap<ast_ty_to_ty_cache_entry>>,
+    pub enum_var_cache: RefCell<DefIdMap<@Vec<@VariantInfo> >>,
+    pub ty_param_defs: RefCell<NodeMap<TypeParameterDef>>,
+    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
-    provided_method_sources: RefCell<DefIdMap<ast::DefId>>,
-    supertraits: RefCell<DefIdMap<@Vec<@TraitRef> >>,
+    pub provided_method_sources: RefCell<DefIdMap<ast::DefId>>,
+    pub supertraits: RefCell<DefIdMap<@Vec<@TraitRef> >>,
 
     // Maps from def-id of a type or region parameter to its
     // (inferred) variance.
-    item_variance_map: RefCell<DefIdMap<@ItemVariances>>,
+    pub item_variance_map: RefCell<DefIdMap<@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.
-    destructor_for_type: RefCell<DefIdMap<ast::DefId>>,
+    pub destructor_for_type: RefCell<DefIdMap<ast::DefId>>,
 
     // A method will be in this list if and only if it is a destructor.
-    destructors: RefCell<DefIdSet>,
+    pub destructors: RefCell<DefIdSet>,
 
     // Maps a trait onto a list of impls of that trait.
-    trait_impls: RefCell<DefIdMap<@RefCell<Vec<@Impl> >>>,
+    pub trait_impls: RefCell<DefIdMap<@RefCell<Vec<@Impl> >>>,
 
     // Maps a def_id 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.
-    inherent_impls: RefCell<DefIdMap<@RefCell<Vec<@Impl> >>>,
+    pub inherent_impls: RefCell<DefIdMap<@RefCell<Vec<@Impl> >>>,
 
     // Maps a def_id of an impl to an Impl structure.
     // 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.
-    impls: RefCell<DefIdMap<@Impl>>,
+    pub impls: RefCell<DefIdMap<@Impl>>,
 
     // Set of used unsafe nodes (functions or blocks). Unsafe nodes not
     // present in this set can be warned about.
-    used_unsafe: RefCell<NodeSet>,
+    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.
-    used_mut_nodes: RefCell<NodeSet>,
+    pub used_mut_nodes: RefCell<NodeSet>,
 
     // vtable resolution information for impl declarations
-    impl_vtables: typeck::impl_vtable_map,
+    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.
-    populated_external_types: RefCell<DefIdSet>,
+    pub populated_external_types: RefCell<DefIdSet>,
 
     // The set of external traits whose implementations have been read. This
     // is used for lazy resolution of traits.
-    populated_external_traits: RefCell<DefIdSet>,
+    pub populated_external_traits: RefCell<DefIdSet>,
 
     // Borrows
-    upvar_borrow_map: RefCell<UpvarBorrowMap>,
+    pub upvar_borrow_map: RefCell<UpvarBorrowMap>,
 
     // These two caches are used by const_eval when decoding external statics
     // and variants that are found.
-    extern_const_statics: RefCell<DefIdMap<Option<@ast::Expr>>>,
-    extern_const_variants: RefCell<DefIdMap<Option<@ast::Expr>>>,
+    pub extern_const_statics: RefCell<DefIdMap<Option<@ast::Expr>>>,
+    pub extern_const_variants: RefCell<DefIdMap<Option<@ast::Expr>>>,
 }
 
 pub enum tbox_flag {
@@ -363,7 +364,7 @@ pub enum tbox_flag {
     has_ty_err = 16,
     has_ty_bot = 32,
 
-    // a meta-flag: subst may be required if the type has parameters, a self
+    // a meta-pub flag: subst may be required if the type has parameters, a self
     // type, or references bound regions
     needs_subst = 1 | 2 | 8
 }
@@ -371,9 +372,9 @@ pub enum tbox_flag {
 pub type t_box = &'static t_box_;
 
 pub struct t_box_ {
-    sty: sty,
-    id: uint,
-    flags: uint,
+    pub sty: sty,
+    pub id: uint,
+    pub flags: uint,
 }
 
 // To reduce refcounting cost, we're representing types as unsafe pointers
@@ -385,7 +386,7 @@ enum t_opaque {}
 
 #[allow(raw_pointer_deriving)]
 #[deriving(Clone, Eq, TotalEq, Hash)]
-pub struct t { priv inner: *t_opaque }
+pub struct t { inner: *t_opaque }
 
 impl fmt::Show for t {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -417,19 +418,19 @@ pub fn type_id(t: t) -> uint { get(t).id }
 
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct BareFnTy {
-    purity: ast::Purity,
-    abis: AbiSet,
-    sig: FnSig
+    pub purity: ast::Purity,
+    pub abis: AbiSet,
+    pub sig: FnSig
 }
 
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct ClosureTy {
-    purity: ast::Purity,
-    sigil: ast::Sigil,
-    onceness: ast::Onceness,
-    region: Region,
-    bounds: BuiltinBounds,
-    sig: FnSig,
+    pub purity: ast::Purity,
+    pub sigil: ast::Sigil,
+    pub onceness: ast::Onceness,
+    pub region: Region,
+    pub bounds: BuiltinBounds,
+    pub sig: FnSig,
 }
 
 /**
@@ -446,16 +447,16 @@ pub struct ClosureTy {
  */
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct FnSig {
-    binder_id: ast::NodeId,
-    inputs: Vec<t>,
-    output: t,
-    variadic: bool
+    pub binder_id: ast::NodeId,
+    pub inputs: Vec<t>,
+    pub output: t,
+    pub variadic: bool
 }
 
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct param_ty {
-    idx: uint,
-    def_id: DefId
+    pub idx: uint,
+    pub def_id: DefId
 }
 
 /// Representation of regions:
@@ -502,8 +503,8 @@ pub enum Region {
  */
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct UpvarId {
-    var_id: ast::NodeId,
-    closure_expr_id: ast::NodeId,
+    pub var_id: ast::NodeId,
+    pub closure_expr_id: ast::NodeId,
 }
 
 #[deriving(Clone, Eq, TotalEq, Hash)]
@@ -603,8 +604,8 @@ pub enum BorrowKind {
  */
 #[deriving(Eq, Clone)]
 pub struct UpvarBorrow {
-    kind: BorrowKind,
-    region: ty::Region,
+    pub kind: BorrowKind,
+    pub region: ty::Region,
 }
 
 pub type UpvarBorrowMap = HashMap<UpvarId, UpvarBorrow>;
@@ -621,8 +622,8 @@ pub fn is_bound(&self) -> bool {
 
 #[deriving(Clone, Eq, Ord, TotalEq, TotalOrd, Hash, Encodable, Decodable, Show)]
 pub struct FreeRegion {
-    scope_id: NodeId,
-    bound_region: BoundRegion
+    pub scope_id: NodeId,
+    pub bound_region: BoundRegion
 }
 
 #[deriving(Clone, Eq, Ord, TotalEq, TotalOrd, Hash, Encodable, Decodable, Show)]
@@ -669,9 +670,9 @@ pub enum RegionSubsts {
  *   always substituted away to the implementing type for a trait. */
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct substs {
-    self_ty: Option<ty::t>,
-    tps: Vec<t>,
-    regions: RegionSubsts,
+    pub self_ty: Option<ty::t>,
+    pub tps: Vec<t>,
+    pub regions: RegionSubsts,
 }
 
 mod primitives {
@@ -759,17 +760,17 @@ pub enum sty {
 
 #[deriving(Clone, Eq, TotalEq, Hash)]
 pub struct TyTrait {
-    def_id: DefId,
-    substs: substs,
-    store: TraitStore,
-    mutability: ast::Mutability,
-    bounds: BuiltinBounds
+    pub def_id: DefId,
+    pub substs: substs,
+    pub store: TraitStore,
+    pub mutability: ast::Mutability,
+    pub bounds: BuiltinBounds
 }
 
 #[deriving(Eq, TotalEq, Hash)]
 pub struct TraitRef {
-    def_id: DefId,
-    substs: substs
+    pub def_id: DefId,
+    pub substs: substs
 }
 
 #[deriving(Clone, Eq)]
@@ -788,8 +789,8 @@ pub enum terr_vstore_kind {
 
 #[deriving(Clone, Show)]
 pub struct expected_found<T> {
-    expected: T,
-    found: T
+    pub expected: T,
+    pub found: T
 }
 
 // Data structures used in type unification
@@ -830,8 +831,8 @@ pub enum type_err {
 
 #[deriving(Eq, TotalEq, Hash)]
 pub struct ParamBounds {
-    builtin_bounds: BuiltinBounds,
-    trait_bounds: Vec<@TraitRef> }
+    pub builtin_bounds: BuiltinBounds,
+    pub trait_bounds: Vec<@TraitRef> }
 
 pub type BuiltinBounds = EnumSet<BuiltinBound>;
 
@@ -878,7 +879,7 @@ fn from_uint(v: uint) -> BuiltinBound {
 
 #[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash)]
 pub struct RegionVid {
-    id: uint
+    pub id: uint
 }
 
 #[deriving(Clone, Eq, TotalEq, Hash)]
@@ -983,16 +984,16 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 #[deriving(Clone)]
 pub struct TypeParameterDef {
-    ident: ast::Ident,
-    def_id: ast::DefId,
-    bounds: @ParamBounds,
-    default: Option<ty::t>
+    pub ident: ast::Ident,
+    pub def_id: ast::DefId,
+    pub bounds: @ParamBounds,
+    pub default: Option<ty::t>
 }
 
 #[deriving(Encodable, Decodable, Clone)]
 pub struct RegionParameterDef {
-    name: ast::Name,
-    def_id: ast::DefId,
+    pub name: ast::Name,
+    pub def_id: ast::DefId,
 }
 
 /// Information about the type/lifetime parameters associated with an item.
@@ -1000,11 +1001,11 @@ pub struct RegionParameterDef {
 #[deriving(Clone)]
 pub struct Generics {
     /// List of type parameters declared on the item.
-    type_param_defs: Rc<Vec<TypeParameterDef> >,
+    pub type_param_defs: Rc<Vec<TypeParameterDef>>,
 
     /// List of region parameters declared on the item.
     /// For a fn or method, only includes *early-bound* lifetimes.
-    region_param_defs: Rc<Vec<RegionParameterDef> >,
+    pub region_param_defs: Rc<Vec<RegionParameterDef>>,
 }
 
 impl Generics {
@@ -1037,13 +1038,13 @@ pub struct ParameterEnvironment {
     /// In general, this means converting from bound parameters to
     /// free parameters. Since we currently represent bound/free type
     /// parameters in the same way, this only has an affect on regions.
-    free_substs: ty::substs,
+    pub free_substs: ty::substs,
 
     /// Bound on the Self parameter
-    self_param_bound: Option<@TraitRef>,
+    pub self_param_bound: Option<@TraitRef>,
 
     /// Bounds on each numbered type parameter
-    type_param_bounds: Vec<ParamBounds> ,
+    pub type_param_bounds: Vec<ParamBounds> ,
 }
 
 /// A polytype.
@@ -1058,20 +1059,20 @@ pub struct ParameterEnvironment {
 ///   region `&self` or to (unsubstituted) ty_param types
 #[deriving(Clone)]
 pub struct ty_param_bounds_and_ty {
-    generics: Generics,
-    ty: t
+    pub generics: Generics,
+    pub ty: t
 }
 
 /// As `ty_param_bounds_and_ty` but for a trait ref.
 pub struct TraitDef {
-    generics: Generics,
-    bounds: BuiltinBounds,
-    trait_ref: @ty::TraitRef,
+    pub generics: Generics,
+    pub bounds: BuiltinBounds,
+    pub trait_ref: @ty::TraitRef,
 }
 
 pub struct ty_param_substs_and_ty {
-    substs: ty::substs,
-    ty: ty::t
+    pub substs: ty::substs,
+    pub ty: ty::t
 }
 
 pub type type_cache = RefCell<DefIdMap<ty_param_bounds_and_ty>>;
@@ -1841,7 +1842,7 @@ fn type_needs_unwind_cleanup_(cx: &ctxt, ty: t,
  * a type than to think about what is *not* contained within a type.
  */
 pub struct TypeContents {
-    bits: u64
+    pub bits: u64
 }
 
 macro_rules! def_type_content_sets(
@@ -3175,8 +3176,8 @@ pub fn map_region(&self, f: |Region| -> Region) -> AutoRef {
 }
 
 pub struct ParamsTy {
-    params: Vec<t>,
-    ty: t
+    pub params: Vec<t>,
+    pub ty: t
 }
 
 pub fn expr_ty_params_and_ty(cx: &ctxt,
@@ -3850,13 +3851,13 @@ pub fn ty_to_def_id(ty: t) -> Option<ast::DefId> {
 // Enum information
 #[deriving(Clone)]
 pub struct VariantInfo {
-    args: Vec<t>,
-    arg_names: Option<Vec<ast::Ident> >,
-    ctor_ty: t,
-    name: ast::Ident,
-    id: ast::DefId,
-    disr_val: Disr,
-    vis: Visibility
+    pub args: Vec<t>,
+    pub arg_names: Option<Vec<ast::Ident> >,
+    pub ctor_ty: t,
+    pub name: ast::Ident,
+    pub id: ast::DefId,
+    pub disr_val: Disr,
+    pub vis: Visibility
 }
 
 impl VariantInfo {
index 88262e8ee73258a7a02b71759010467609e72b2f..7eae2ce3d336461337e8a027f829e3f50d267e2c 100644 (file)
@@ -219,8 +219,8 @@ pub fn super_fold_trait_store<T:TypeFolder>(this: &mut T,
 // Some sample folders
 
 pub struct BottomUpFolder<'a> {
-    tcx: &'a ty::ctxt,
-    fldop: 'a |ty::t| -> ty::t,
+    pub tcx: &'a ty::ctxt,
+    pub fldop: 'a |ty::t| -> ty::t,
 }
 
 impl<'a> TypeFolder for BottomUpFolder<'a> {
index 38cb48a6c7c2449b191785b8a252333fca3d8031..b6f81d94418e128d25f5f0608aa7136ca8c6c1b6 100644 (file)
@@ -103,8 +103,8 @@ pub fn check_match(fcx: &FnCtxt,
 }
 
 pub struct pat_ctxt<'a> {
-    fcx: &'a FnCtxt<'a>,
-    map: PatIdMap,
+    pub fcx: &'a FnCtxt<'a>,
+    pub map: PatIdMap,
 }
 
 pub fn check_pat_variant(pcx: &pat_ctxt, pat: &ast::Pat, path: &ast::Path,
index 6a6ed9a754598b5ffe0570467948f9f87ae71f75..9aa98ee5f8e8c256cce98546e72bc4111496052d 100644 (file)
@@ -178,9 +178,9 @@ pub enum FnKind {
 
 #[deriving(Clone)]
 pub struct PurityState {
-    def: ast::NodeId,
-    purity: ast::Purity,
-    priv from_fn: bool
+    pub def: ast::NodeId,
+    pub purity: ast::Purity,
+    from_fn: bool
 }
 
 impl PurityState {
index 15de3bf2b5f8e59fbc7b986e9baecb48d56c6d1a..67cf14050ed732f0f80cbd569ca2e3f2abac9c8a 100644 (file)
@@ -65,8 +65,8 @@
 /// A vtable context includes an inference context, a crate context, and a
 /// callback function to call in case of type error.
 pub struct VtableContext<'a> {
-    infcx: &'a infer::InferCtxt<'a>,
-    param_env: &'a ty::ParameterEnvironment,
+    pub infcx: &'a infer::InferCtxt<'a>,
+    pub param_env: &'a ty::ParameterEnvironment,
 }
 
 impl<'a> VtableContext<'a> {
index 1516a7bec34071690e68ac11a164b17659990f8d..af84e915f70403d4d4901903a0020065ac2b39ba 100644 (file)
@@ -331,9 +331,9 @@ fn trait_refs(&self,
 }
 
 pub struct CombineFields<'a> {
-    infcx: &'a InferCtxt<'a>,
-    a_is_expected: bool,
-    trace: TypeTrace,
+    pub infcx: &'a InferCtxt<'a>,
+    pub a_is_expected: bool,
+    pub trace: TypeTrace,
 }
 
 pub fn expected_found<C:Combine,T>(
index 7daf03d8526407ffb03c5cb19cffc4dabdb18e1a..41edc26e803d3118dc1b0d005cf2dc08e691f641 100644 (file)
@@ -75,26 +75,26 @@ pub struct Bounds<T> {
 pub type CoerceResult = cres<Option<@ty::AutoAdjustment>>;
 
 pub struct InferCtxt<'a> {
-    tcx: &'a ty::ctxt,
+    pub tcx: &'a ty::ctxt,
 
     // We instantiate ValsAndBindings with bounds<ty::t> because the
     // types that might instantiate a general type variable have an
     // order, represented by its upper and lower bounds.
-    ty_var_bindings: RefCell<ValsAndBindings<ty::TyVid, Bounds<ty::t>>>,
-    ty_var_counter: Cell<uint>,
+    pub ty_var_bindings: RefCell<ValsAndBindings<ty::TyVid, Bounds<ty::t>>>,
+    pub ty_var_counter: Cell<uint>,
 
     // Map from integral variable to the kind of integer it represents
-    int_var_bindings: RefCell<ValsAndBindings<ty::IntVid,
+    pub int_var_bindings: RefCell<ValsAndBindings<ty::IntVid,
                                               Option<IntVarValue>>>,
-    int_var_counter: Cell<uint>,
+    pub int_var_counter: Cell<uint>,
 
     // Map from floating variable to the kind of float it represents
-    float_var_bindings: RefCell<ValsAndBindings<ty::FloatVid,
+    pub float_var_bindings: RefCell<ValsAndBindings<ty::FloatVid,
                                                 Option<ast::FloatTy>>>,
-    float_var_counter: Cell<uint>,
+    pub float_var_counter: Cell<uint>,
 
     // For region variables.
-    region_vars: RegionVarBindings<'a>,
+    pub region_vars: RegionVarBindings<'a>,
 }
 
 /// Why did we require that the two types be related?
index 4d6d2da18bf1e6e1b6f07e1f1334e7db2fd2cd87..03b2ebcc2459c00b63918d2b8189a6047392ffc2 100644 (file)
@@ -104,8 +104,8 @@ pub enum RegionResolutionError {
 /// 'a and 'b together inside a SameRegions struct
 #[deriving(Clone)]
 pub struct SameRegions {
-    scope_id: ast::NodeId,
-    regions: Vec<BoundRegion>
+    pub scope_id: ast::NodeId,
+    pub regions: Vec<BoundRegion>
 }
 
 impl SameRegions {
index 20d268bca6c2002dc248a5947643f4d20a70c1cb..2ee4f8fedd25b8711e5cb857fa14e39464ef3265 100644 (file)
@@ -26,14 +26,14 @@ pub enum VarValue<V, T> {
 }
 
 pub struct ValsAndBindings<V, T> {
-    vals: SmallIntMap<VarValue<V, T>>,
-    bindings: Vec<(V, VarValue<V, T>)> ,
+    pub vals: SmallIntMap<VarValue<V, T>>,
+    pub bindings: Vec<(V, VarValue<V, T>)> ,
 }
 
 pub struct Node<V, T> {
-    root: V,
-    possible_types: T,
-    rank: uint,
+    pub root: V,
+    pub possible_types: T,
+    pub rank: uint,
 }
 
 pub trait UnifyVid<T> {
index 72cc936f23ee3b43a04d482642871fd376e70b7c..efb556ecea6984e59eb2753c6247c2a53ea6f64b 100644 (file)
@@ -108,49 +108,49 @@ pub enum MethodOrigin {
 #[deriving(Clone, Encodable, Decodable)]
 pub struct MethodParam {
     // the trait containing the method to be invoked
-    trait_id: ast::DefId,
+    pub trait_id: ast::DefId,
 
     // index of the method to be invoked amongst the trait's methods
-    method_num: uint,
+    pub method_num: uint,
 
     // index of the type parameter (from those that are in scope) that is
     // the type of the receiver
-    param_num: param_index,
+    pub param_num: param_index,
 
     // index of the bound for this type parameter which specifies the trait
-    bound_num: uint,
+    pub bound_num: uint,
 }
 
 // details for a method invoked with a receiver whose type is an object
 #[deriving(Clone, Encodable, Decodable)]
 pub struct MethodObject {
     // the (super)trait containing the method to be invoked
-    trait_id: ast::DefId,
+    pub trait_id: ast::DefId,
 
     // the actual base trait id of the object
-    object_trait_id: ast::DefId,
+    pub object_trait_id: ast::DefId,
 
     // index of the method to be invoked amongst the trait's methods
-    method_num: uint,
+    pub method_num: uint,
 
     // index into the actual runtime vtable.
     // the vtable is formed by concatenating together the method lists of
     // the base object trait and all supertraits;  this is the index into
     // that vtable
-    real_index: uint,
+    pub real_index: uint,
 }
 
 #[deriving(Clone)]
 pub struct MethodCallee {
-    origin: MethodOrigin,
-    ty: ty::t,
-    substs: ty::substs
+    pub origin: MethodOrigin,
+    pub ty: ty::t,
+    pub substs: ty::substs
 }
 
 #[deriving(Clone, Eq, TotalEq, Hash, Show)]
 pub struct MethodCall {
-    expr_id: ast::NodeId,
-    autoderef: u32
+    pub expr_id: ast::NodeId,
+    pub autoderef: u32
 }
 
 impl MethodCall {
@@ -224,9 +224,9 @@ fn repr(&self, tcx: &ty::ctxt) -> ~str {
 #[deriving(Clone)]
 pub struct impl_res {
     // resolutions for any bounded params on the trait definition
-    trait_vtables: vtable_res,
+    pub trait_vtables: vtable_res,
     // resolutions for the trait /itself/ (and for supertraits)
-    self_vtables: vtable_param_res
+    pub self_vtables: vtable_param_res
 }
 
 impl Repr for impl_res {
index 75d6f1f5cd19eef5576dc78b9a96d1ff2aaa5a9a..944b1e237f981ecb1860dee0fd4db4702b896d88 100644 (file)
@@ -473,7 +473,7 @@ fn finish(&mut self) {
 
 /// The SHA-256 hash algorithm
 pub struct Sha256 {
-    priv engine: Engine256
+    engine: Engine256
 }
 
 impl Sha256 {