Skip to content

Commit 96e5546

Browse files
committed
---
yaml --- r: 151452 b: refs/heads/try2 c: bf1e065 h: refs/heads/master v: v3
1 parent 7606b3a commit 96e5546

File tree

17 files changed

+353
-614
lines changed

17 files changed

+353
-614
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: c0a25e4fdc1fcdde8378b4177a6f06c58001a3be
8+
refs/heads/try2: bf1e065371f8e50f84318b45fb21a949faa9449f
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
5454
workcache url log regex graphviz core
55-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
55+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

@@ -61,7 +61,7 @@ DEPS_std := core libc native:rustrt native:compiler-rt native:backtrace
6161
DEPS_green := std rand native:context_switch
6262
DEPS_rustuv := std native:uv native:uv_support
6363
DEPS_native := std
64-
DEPS_syntax := std term serialize collections log fmt_macros
64+
DEPS_syntax := std term serialize collections log
6565
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
6666
collections time log
6767
DEPS_rustdoc := rustc native:hoedown serialize sync getopts collections \
@@ -88,7 +88,6 @@ DEPS_workcache := std serialize collections log
8888
DEPS_log := std sync
8989
DEPS_regex := std collections
9090
DEPS_regex_macros = syntax std regex
91-
DEPS_fmt_macros = std
9291

9392
TOOL_DEPS_compiletest := test green rustuv getopts
9493
TOOL_DEPS_rustdoc := rustdoc native

branches/try2/src/libcore/should_not_exist.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -151,39 +151,6 @@ impl<A: Clone> Clone for ~[A] {
151151
}
152152
}
153153

154-
impl<A> FromIterator<A> for ~[A] {
155-
fn from_iter<T: Iterator<A>>(mut iterator: T) -> ~[A] {
156-
let (lower, _) = iterator.size_hint();
157-
let cap = if lower == 0 {16} else {lower};
158-
let mut cap = cap.checked_mul(&mem::size_of::<A>()).unwrap();
159-
let mut len = 0;
160-
161-
unsafe {
162-
let mut ptr = alloc(cap) as *mut Vec<A>;
163-
let mut ret = cast::transmute(ptr);
164-
for elt in iterator {
165-
if len * mem::size_of::<A>() >= cap {
166-
cap = cap.checked_mul(&2).unwrap();
167-
let ptr2 = alloc(cap) as *mut Vec<A>;
168-
ptr::copy_nonoverlapping_memory(&mut (*ptr2).data,
169-
&(*ptr).data,
170-
len);
171-
free(ptr as *u8);
172-
cast::forget(ret);
173-
ret = cast::transmute(ptr2);
174-
ptr = ptr2;
175-
}
176-
177-
let base = &mut (*ptr).data as *mut A;
178-
intrinsics::move_val_init(&mut *base.offset(len as int), elt);
179-
len += 1;
180-
(*ptr).fill = len * mem::nonzero_size_of::<A>();
181-
}
182-
ret
183-
}
184-
}
185-
}
186-
187154
#[cfg(not(test))]
188155
impl<'a,T:Clone, V: Vector<T>> Add<V, ~[T]> for &'a [T] {
189156
#[inline]

branches/try2/src/librustc/middle/resolve.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,20 +1620,18 @@ impl<'a> Resolver<'a> {
16201620

16211621
match def {
16221622
DefMod(_) | DefForeignMod(_) => {}
1623-
DefVariant(enum_did, variant_id, is_struct) => {
1623+
DefVariant(_, variant_id, is_struct) => {
16241624
debug!("(building reduced graph for external crate) building \
16251625
variant {}",
16261626
final_ident);
1627-
// If this variant is public, then it was publicly reexported,
1628-
// otherwise we need to inherit the visibility of the enum
1629-
// definition.
1630-
let is_exported = is_public ||
1631-
self.external_exports.contains(&enum_did);
1627+
// We assume the parent is visible, or else we wouldn't have seen
1628+
// it. Also variants are public-by-default if the parent was also
1629+
// public.
16321630
if is_struct {
1633-
child_name_bindings.define_type(def, DUMMY_SP, is_exported);
1631+
child_name_bindings.define_type(def, DUMMY_SP, true);
16341632
self.structs.insert(variant_id);
16351633
} else {
1636-
child_name_bindings.define_value(def, DUMMY_SP, is_exported);
1634+
child_name_bindings.define_value(def, DUMMY_SP, true);
16371635
}
16381636
}
16391637
DefFn(..) | DefStaticMethod(..) | DefStatic(..) => {

branches/try2/src/librustc/middle/ty_fold.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ pub trait TypeFolder {
7171
fn fold_trait_store(&mut self, s: ty::TraitStore) -> ty::TraitStore {
7272
super_fold_trait_store(self, s)
7373
}
74-
75-
fn fold_autoref(&mut self, ar: &ty::AutoRef) -> ty::AutoRef {
76-
super_fold_autoref(self, ar)
77-
}
7874
}
7975

8076
pub fn fold_opt_ty<T:TypeFolder>(this: &mut T,
@@ -204,19 +200,6 @@ pub fn super_fold_trait_store<T:TypeFolder>(this: &mut T,
204200
}
205201
}
206202

207-
pub fn super_fold_autoref<T:TypeFolder>(this: &mut T,
208-
autoref: &ty::AutoRef)
209-
-> ty::AutoRef
210-
{
211-
match *autoref {
212-
ty::AutoPtr(r, m) => ty::AutoPtr(this.fold_region(r), m),
213-
ty::AutoBorrowVec(r, m) => ty::AutoBorrowVec(this.fold_region(r), m),
214-
ty::AutoBorrowVecRef(r, m) => ty::AutoBorrowVecRef(this.fold_region(r), m),
215-
ty::AutoUnsafe(m) => ty::AutoUnsafe(m),
216-
ty::AutoBorrowObj(r, m) => ty::AutoBorrowObj(this.fold_region(r), m),
217-
}
218-
}
219-
220203
///////////////////////////////////////////////////////////////////////////
221204
// Some sample folders
222205

branches/try2/src/librustc/middle/typeck/check/mod.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ enum IsBinopAssignment{
221221

222222
#[deriving(Clone)]
223223
pub struct FnCtxt<'a> {
224-
// This flag is set to true if, during the writeback phase, we encounter
225-
// a type error in this function.
226-
writeback_errors: Cell<bool>,
227-
228224
// Number of errors that had been reported when we started
229225
// checking this function. On exit, if we find that *more* errors
230226
// have been reported, we will skip regionck and other work that
@@ -284,7 +280,6 @@ fn blank_fn_ctxt<'a>(ccx: &'a CrateCtxt<'a>,
284280
region_bnd: ast::NodeId)
285281
-> FnCtxt<'a> {
286282
FnCtxt {
287-
writeback_errors: Cell::new(false),
288283
err_count_on_creation: ccx.tcx.sess.err_count(),
289284
ret_ty: rty,
290285
ps: RefCell::new(FnStyleState::function(ast::NormalFn, 0)),
@@ -474,7 +469,6 @@ fn check_fn<'a>(ccx: &'a CrateCtxt<'a>,
474469
// Create the function context. This is either derived from scratch or,
475470
// in the case of function expressions, based on the outer context.
476471
let fcx = FnCtxt {
477-
writeback_errors: Cell::new(false),
478472
err_count_on_creation: err_count_on_creation,
479473
ret_ty: ret_ty,
480474
ps: RefCell::new(FnStyleState::function(fn_style, id)),
@@ -1204,10 +1198,11 @@ impl<'a> FnCtxt<'a> {
12041198

12051199
pub fn opt_node_ty_substs(&self,
12061200
id: ast::NodeId,
1207-
f: |&ty::substs|) {
1201+
f: |&ty::substs| -> bool)
1202+
-> bool {
12081203
match self.inh.node_type_substs.borrow().find(&id) {
1209-
Some(s) => { f(s) }
1210-
None => { }
1204+
Some(s) => f(s),
1205+
None => true
12111206
}
12121207
}
12131208

branches/try2/src/librustc/middle/typeck/check/vtable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ pub fn early_resolve_expr(ex: &ast::Expr, fcx: &FnCtxt, is_early: bool) {
644644
insert_vtables(fcx, MethodCall::expr(ex.id), vtbls);
645645
}
646646
}
647+
true
647648
});
648649
}
649650

0 commit comments

Comments
 (0)