auto merge of #12662 : sfackler/rust/unexported-type, r=cmr

This commit is contained in:
bors 2014-03-02 17:36:28 -08:00
commit fbe26af3c5
20 changed files with 43 additions and 46 deletions

View File

@ -30,8 +30,6 @@
#[feature(macro_rules, globs, struct_variant, managed_boxes)];
#[feature(quote)];
#[allow(visible_private_types)];
extern crate extra;
extern crate flate;
extern crate arena;

View File

@ -46,7 +46,7 @@
use syntax::codemap;
use syntax::crateid::CrateId;
type Cmd = @crate_metadata;
pub type Cmd = @crate_metadata;
// A function that takes a def_id relative to the crate being searched and
// returns a def_id relative to the compilation environment, i.e. if we hit a

View File

@ -52,7 +52,7 @@
use writer = serialize::ebml::writer;
// used by astencode:
type abbrev_map = @RefCell<HashMap<ty::t, tyencode::ty_abbrev>>;
pub type abbrev_map = @RefCell<HashMap<ty::t, tyencode::ty_abbrev>>;
/// A borrowed version of ast::InlinedItem.
pub enum InlinedItemRef<'a> {
@ -76,7 +76,7 @@ pub struct EncodeParams<'a> {
encode_inlined_item: EncodeInlinedItem<'a>,
}
struct Stats {
pub struct Stats {
inline_bytes: Cell<u64>,
attr_bytes: Cell<u64>,
dep_bytes: Cell<u64>,

View File

@ -54,7 +54,7 @@ pub enum DefIdSource {
// Identifies a region parameter (`fn foo<'X>() { ... }`).
RegionParameter,
}
type conv_did<'a> =
pub type conv_did<'a> =
'a |source: DefIdSource, ast::DefId| -> ast::DefId;
pub struct PState<'a> {

View File

@ -907,7 +907,7 @@ fn repr(&self, tcx: ty::ctxt) -> ~str {
///////////////////////////////////////////////////////////////////////////
struct TcxTyper {
pub struct TcxTyper {
tcx: ty::ctxt,
method_map: typeck::MethodMap,
}

View File

@ -20,7 +20,7 @@
use syntax::visit::Visitor;
use syntax::visit;
struct CheckCrateVisitor {
pub struct CheckCrateVisitor {
sess: Session,
def_map: resolve::DefMap,
method_map: typeck::MethodMap,

View File

@ -126,9 +126,9 @@
use syntax::visit::{Visitor, FnKind};
#[deriving(Eq)]
struct Variable(uint);
pub struct Variable(uint);
#[deriving(Eq)]
struct LiveNode(uint);
pub struct LiveNode(uint);
impl Variable {
fn get(&self) -> uint { let Variable(v) = *self; v }
@ -145,7 +145,7 @@ fn clone(&self) -> LiveNode {
}
#[deriving(Eq)]
enum LiveNodeKind {
pub enum LiveNodeKind {
FreeVarNode(Span),
ExprNode(Span),
VarDefNode(Span),
@ -226,32 +226,32 @@ pub fn is_valid(&self) -> bool {
fn invalid_node() -> LiveNode { LiveNode(uint::MAX) }
struct CaptureInfo {
pub struct CaptureInfo {
ln: LiveNode,
is_move: bool,
var_nid: NodeId
}
enum LocalKind {
pub enum LocalKind {
FromMatch(BindingMode),
FromLetWithInitializer,
FromLetNoInitializer
}
struct LocalInfo {
pub struct LocalInfo {
id: NodeId,
ident: Ident,
is_mutbl: bool,
kind: LocalKind,
}
enum VarKind {
pub enum VarKind {
Arg(NodeId, Ident),
Local(LocalInfo),
ImplicitRet
}
struct IrMaps {
pub struct IrMaps {
tcx: ty::ctxt,
method_map: typeck::MethodMap,
capture_map: moves::CaptureMap,
@ -560,7 +560,7 @@ fn visit_expr(v: &mut LivenessVisitor, expr: &Expr, this: @IrMaps) {
// the same basic propagation framework in all cases.
#[deriving(Clone)]
struct Users {
pub struct Users {
reader: LiveNode,
writer: LiveNode,
used: bool
@ -574,7 +574,7 @@ fn invalid_users() -> Users {
}
}
struct Specials {
pub struct Specials {
exit_ln: LiveNode,
fallthrough_ln: LiveNode,
no_ret_var: Variable
@ -584,7 +584,7 @@ struct Specials {
static ACC_WRITE: uint = 2u;
static ACC_USE: uint = 4u;
type LiveNodeMap = @RefCell<HashMap<NodeId, LiveNode>>;
pub type LiveNodeMap = @RefCell<HashMap<NodeId, LiveNode>>;
pub struct Liveness {
tcx: ty::ctxt,
@ -1554,7 +1554,7 @@ fn check_fn(_v: &Liveness,
// do not check contents of nested fns
}
enum ReadKind {
pub enum ReadKind {
PossiblyUninitializedVariable,
PossiblyUninitializedField,
MovedValue,

View File

@ -1322,8 +1322,8 @@ fn arg_kind(cx: &FunctionContext, t: ty::t) -> datum::Rvalue {
}
// work around bizarre resolve errors
type RvalueDatum = datum::Datum<datum::Rvalue>;
type LvalueDatum = datum::Datum<datum::Lvalue>;
pub type RvalueDatum = datum::Datum<datum::Rvalue>;
pub type LvalueDatum = datum::Datum<datum::Lvalue>;
// create_datums_for_fn_args: creates rvalue datums for each of the
// incoming function arguments. These will later be stored into

View File

@ -51,20 +51,20 @@ pub struct CustomScopeIndex {
pub static EXIT_LOOP: uint = 1;
pub static EXIT_MAX: uint = 2;
enum CleanupScopeKind<'a> {
pub enum CleanupScopeKind<'a> {
CustomScopeKind,
AstScopeKind(ast::NodeId),
LoopScopeKind(ast::NodeId, [&'a Block<'a>, ..EXIT_MAX])
}
#[deriving(Eq)]
enum EarlyExitLabel {
pub enum EarlyExitLabel {
UnwindExit,
ReturnExit,
LoopExit(ast::NodeId, uint)
}
struct CachedEarlyExit {
pub struct CachedEarlyExit {
label: EarlyExitLabel,
cleanup_block: BasicBlockRef,
}

View File

@ -212,8 +212,8 @@ fn repr(&self, tcx: ty::ctxt) -> ~str {
}
// work around bizarre resolve errors
type RvalueDatum = datum::Datum<datum::Rvalue>;
type LvalueDatum = datum::Datum<datum::Lvalue>;
pub type RvalueDatum = datum::Datum<datum::Rvalue>;
pub type LvalueDatum = datum::Datum<datum::Lvalue>;
// Function context. Every LLVM function we create will have one of
// these.

View File

@ -158,9 +158,9 @@ pub struct creader_cache_key {
len: uint
}
type creader_cache = RefCell<HashMap<creader_cache_key, t>>;
pub type creader_cache = RefCell<HashMap<creader_cache_key, t>>;
struct intern_key {
pub struct intern_key {
sty: *sty,
}
@ -1068,7 +1068,7 @@ pub struct ty_param_substs_and_ty {
ty: ty::t
}
type type_cache = RefCell<HashMap<ast::DefId, ty_param_bounds_and_ty>>;
pub type type_cache = RefCell<HashMap<ast::DefId, ty_param_bounds_and_ty>>;
pub type node_type_table = RefCell<HashMap<uint,t>>;

View File

@ -729,4 +729,4 @@ pub fn check_pointer_pat(pcx: &pat_ctxt,
}
#[deriving(Eq)]
enum PointerKind { Send, Borrowed }
pub enum PointerKind { Send, Borrowed }

View File

@ -236,7 +236,7 @@ pub struct Candidate {
/// now we must check that the type `T` is correct). Unfortunately,
/// because traits are not types, this is a pain to do.
#[deriving(Clone)]
enum RcvrMatchCondition {
pub enum RcvrMatchCondition {
RcvrMatchesIfObject(ast::DefId),
RcvrMatchesIfSubtype(ty::t)
}

View File

@ -500,7 +500,7 @@ fn rollback_to<V:Clone + Vid,T:Clone>(vb: &mut ValsAndBindings<V, T>,
}
}
struct Snapshot {
pub struct Snapshot {
ty_var_bindings_len: uint,
int_var_bindings_len: uint,
float_var_bindings_len: uint,

View File

@ -35,7 +35,7 @@
mod doc;
#[deriving(Eq, Hash)]
enum Constraint {
pub enum Constraint {
ConstrainVarSubVar(RegionVid, RegionVid),
ConstrainRegSubVar(Region, RegionVid),
ConstrainVarSubReg(RegionVid, Region),
@ -43,19 +43,19 @@ enum Constraint {
}
#[deriving(Eq, Hash)]
struct TwoRegions {
pub struct TwoRegions {
a: Region,
b: Region,
}
enum UndoLogEntry {
pub enum UndoLogEntry {
Snapshot,
AddVar(RegionVid),
AddConstraint(Constraint),
AddCombination(CombineMapType, TwoRegions)
}
enum CombineMapType {
pub enum CombineMapType {
Lub, Glb
}
@ -84,7 +84,7 @@ pub enum RegionResolutionError {
SubregionOrigin, Region),
}
type CombineMap = HashMap<TwoRegions, RegionVid>;
pub type CombineMap = HashMap<TwoRegions, RegionVid>;
pub struct RegionVarBindings {
tcx: ty::ctxt,
@ -764,7 +764,7 @@ fn intersect_scopes(&self,
#[deriving(Eq, Show)]
enum Classification { Expanding, Contracting }
enum VarValue { NoValue, Value(Region), ErrorValue }
pub enum VarValue { NoValue, Value(Region), ErrorValue }
struct VarData {
classification: Classification,

View File

@ -660,7 +660,7 @@ fn expand_non_macro_stmt(s: &Stmt, fld: &mut MacroExpander)
// from a given thingy and puts them in a mutable
// array (passed in to the traversal)
#[deriving(Clone)]
struct NewNameFinderContext {
pub struct NewNameFinderContext {
ident_accumulator: Vec<ast::Ident> ,
}
@ -748,7 +748,7 @@ pub fn expand_block_elts(b: &Block, fld: &mut MacroExpander) -> P<Block> {
})
}
struct IdentRenamer<'a> {
pub struct IdentRenamer<'a> {
renames: &'a mut RenameList,
}

View File

@ -31,7 +31,6 @@
#[feature(quote)];
#[deny(non_camel_case_types)];
#[allow(visible_private_types)];
extern crate serialize;
extern crate term;

View File

@ -87,7 +87,7 @@
#[allow(non_camel_case_types)]
#[deriving(Eq)]
enum restriction {
pub enum restriction {
UNRESTRICTED,
RESTRICT_STMT_EXPR,
RESTRICT_NO_BAR_OP,

View File

@ -139,12 +139,12 @@ pub fn buf_str(toks: Vec<Token> , szs: Vec<int> , left: uint, right: uint,
return s;
}
enum PrintStackBreak {
pub enum PrintStackBreak {
Fits,
Broken(Breaks),
}
struct PrintStackElem {
pub struct PrintStackElem {
offset: int,
pbreak: PrintStackBreak
}

View File

@ -1027,7 +1027,7 @@ pub fn print_block_with_attrs(s: &mut State,
true)
}
enum EmbedType {
pub enum EmbedType {
BlockBlockFn,
BlockNormal,
}