Skip to content

Commit 3c2aaec

Browse files
committed
---
yaml --- r: 158987 b: refs/heads/auto c: 1971e02 h: refs/heads/master i: 158985: 617678e 158983: f8e4968 v: v3
1 parent ce7f707 commit 3c2aaec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+863
-1491
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: ebc625ad3eaa2ee630c6c8203106826ad23abc98
13+
refs/heads/auto: 1971e02ec62bfe50963d1986552e241602c3dc20
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,6 @@ putvar() {
7676
printf "%-20s := %s\n" $1 "$T" >>config.tmp
7777
}
7878

79-
putpathvar() {
80-
local T
81-
eval T=\$$1
82-
eval TLEN=\${#$1}
83-
if [ $TLEN -gt 35 ]
84-
then
85-
printf "configure: %-20s := %.35s ...\n" $1 "$T"
86-
else
87-
printf "configure: %-20s := %s %s\n" $1 "$T" "$2"
88-
fi
89-
if [ -z "$T" ]
90-
then
91-
printf "%-20s := \n" $1 >>config.tmp
92-
else
93-
printf "%-20s := \"%s\"\n" $1 "$T" >>config.tmp
94-
fi
95-
}
96-
9779
probe() {
9880
local V=$1
9981
shift
@@ -119,7 +101,7 @@ probe() {
119101
fi
120102
done
121103
eval $V=\$T
122-
putpathvar $V "$VER"
104+
putvar $V "$VER"
123105
}
124106

125107
probe_need() {
@@ -656,9 +638,9 @@ probe CFG_ADB adb
656638

657639
if [ ! -z "$CFG_PANDOC" ]
658640
then
659-
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc\(.exe\)\? ' |
641+
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' |
660642
# extract the first 2 version fields, ignore everything else
661-
sed 's/pandoc\(.exe\)\? \([0-9]*\)\.\([0-9]*\).*/\2 \3/')
643+
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
662644

663645
MIN_PV_MAJOR="1"
664646
MIN_PV_MINOR="9"
@@ -1348,7 +1330,8 @@ do
13481330
done
13491331

13501332
# Munge any paths that appear in config.mk back to posix-y
1351-
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' config.tmp
1333+
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' \
1334+
-e 's@\\@/@go;' config.tmp
13521335
rm -f config.tmp.bak
13531336

13541337
msg

branches/auto/mk/docs.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
2929
guide-tasks guide-container guide-pointers guide-testing \
3030
guide-plugin guide-crates complement-bugreport \
31-
complement-lang-faq complement-design-faq complement-project-faq \
31+
complement-lang-faq complement-design-faq complement-project-faq rust \
3232
rustdoc guide-unsafe guide-strings reference
3333

3434
PDF_DOCS := guide reference
3535

36-
RUSTDOC_DEPS_reference := doc/full-toc.inc
37-
RUSTDOC_FLAGS_reference := --html-in-header=doc/full-toc.inc
36+
RUSTDOC_DEPS_rust := doc/full-toc.inc
37+
RUSTDOC_FLAGS_rust := --html-in-header=doc/full-toc.inc
3838

3939
L10N_LANGS := ja
4040

branches/auto/mk/reconfig.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ifndef CFG_DISABLE_MANAGE_SUBMODULES
1919
# (nothing checked out at all). `./configure --{llvm,jemalloc}-root`
2020
# will explicitly deinitialize the corresponding submodules, and we don't
2121
# want to force constant rebuilds in that case.
22-
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && $(CFG_GIT) submodule status | grep -c '^+')
22+
NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^+')
2323
else
2424
NEED_GIT_RECONFIG=0
2525
endif

branches/auto/src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl<T: Send + Sync + Clone> Arc<T> {
166166
// additional reference of either kind.
167167
if self.inner().strong.load(atomic::SeqCst) != 1 ||
168168
self.inner().weak.load(atomic::SeqCst) != 1 {
169-
*self = Arc::new((**self).clone())
169+
*self = Arc::new(self.deref().clone())
170170
}
171171
// This unsafety is ok because we're guaranteed that the pointer
172172
// returned is the *only* pointer that will ever be returned to T. Our

branches/auto/src/libcollections/enum_set.rs

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,7 @@ impl<E:CLike+fmt::Show> fmt::Show for EnumSet<E> {
4343
}
4444
}
4545

46-
/**
47-
An interface for casting C-like enum to uint and back.
48-
A typically implementation is as below.
49-
50-
```{rust,ignore}
51-
#[repr(uint)]
52-
enum Foo {
53-
A, B, C
54-
}
55-
56-
impl CLike for Foo {
57-
fn to_uint(&self) -> uint {
58-
*self as uint
59-
}
60-
61-
fn from_uint(v: uint) -> Foo {
62-
unsafe { mem::transmute(v) }
63-
}
64-
}
65-
```
66-
*/
46+
/// An interface for casting C-like enum to uint and back.
6747
pub trait CLike {
6848
/// Converts a C-like enum to a `uint`.
6949
fn to_uint(&self) -> uint;
@@ -72,11 +52,7 @@ pub trait CLike {
7252
}
7353

7454
fn bit<E:CLike>(e: &E) -> uint {
75-
use core::uint;
76-
let value = e.to_uint();
77-
assert!(value < uint::BITS,
78-
"EnumSet only supports up to {} variants.", uint::BITS - 1);
79-
1 << value
55+
1 << e.to_uint()
8056
}
8157

8258
impl<E:CLike> EnumSet<E> {
@@ -402,31 +378,4 @@ mod test {
402378
let elems = e_subtract.iter().collect();
403379
assert_eq!(vec![A], elems)
404380
}
405-
406-
#[test]
407-
#[should_fail]
408-
fn test_overflow() {
409-
#[allow(dead_code)]
410-
#[repr(uint)]
411-
enum Bar {
412-
V00, V01, V02, V03, V04, V05, V06, V07, V08, V09,
413-
V10, V11, V12, V13, V14, V15, V16, V17, V18, V19,
414-
V20, V21, V22, V23, V24, V25, V26, V27, V28, V29,
415-
V30, V31, V32, V33, V34, V35, V36, V37, V38, V39,
416-
V40, V41, V42, V43, V44, V45, V46, V47, V48, V49,
417-
V50, V51, V52, V53, V54, V55, V56, V57, V58, V59,
418-
V60, V61, V62, V63, V64, V65, V66, V67, V68, V69,
419-
}
420-
impl CLike for Bar {
421-
fn to_uint(&self) -> uint {
422-
*self as uint
423-
}
424-
425-
fn from_uint(v: uint) -> Bar {
426-
unsafe { mem::transmute(v) }
427-
}
428-
}
429-
let mut set = EnumSet::empty();
430-
set.add(V64);
431-
}
432381
}

branches/auto/src/libcore/atomic.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -717,15 +717,15 @@ unsafe fn atomic_xor<T>(dst: *mut T, val: T, order: Ordering) -> T {
717717
/// A fence 'A' which has `Release` ordering semantics, synchronizes with a
718718
/// fence 'B' with (at least) `Acquire` semantics, if and only if there exists
719719
/// atomic operations X and Y, both operating on some atomic object 'M' such
720-
/// that A is sequenced before X, Y is synchronized before B and Y observes
720+
/// that A is sequenced before X, Y is synchronized before B and Y observers
721721
/// the change to M. This provides a happens-before dependence between A and B.
722722
///
723723
/// Atomic operations with `Release` or `Acquire` semantics can also synchronize
724724
/// with a fence.
725725
///
726-
/// A fence which has `SeqCst` ordering, in addition to having both `Acquire`
727-
/// and `Release` semantics, participates in the global program order of the
728-
/// other `SeqCst` operations and/or fences.
726+
/// A fence with has `SeqCst` ordering, in addition to having both `Acquire` and
727+
/// `Release` semantics, participates in the global program order of the other
728+
/// `SeqCst` operations and/or fences.
729729
///
730730
/// Accepts `Acquire`, `Release`, `AcqRel` and `SeqCst` orderings.
731731
///

branches/auto/src/libcore/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ extern "rust-intrinsic" {
536536
/// `TypeId` represents a globally unique identifier for a type
537537
#[lang="type_id"] // This needs to be kept in lockstep with the code in trans/intrinsic.rs and
538538
// middle/lang_items.rs
539-
#[deriving(PartialEq, Eq, Show)]
539+
#[deriving(Clone, PartialEq, Eq, Show)]
540540
pub struct TypeId {
541541
t: u64,
542542
}

branches/auto/src/libcore/ops.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ shr_impl!(uint u8 u16 u32 u64 int i8 i16 i32 i64)
638638
* ```
639639
*/
640640
#[lang="index"]
641-
pub trait Index<Index, Sized? Result> for Sized? {
641+
pub trait Index<Index, Sized? Result> {
642642
/// The method for the indexing (`Foo[Bar]`) operation
643643
fn index<'a>(&'a self, index: &Index) -> &'a Result;
644644
}
@@ -669,7 +669,7 @@ pub trait Index<Index, Sized? Result> for Sized? {
669669
* ```
670670
*/
671671
#[lang="index_mut"]
672-
pub trait IndexMut<Index, Result> for Sized? {
672+
pub trait IndexMut<Index, Result> {
673673
/// The method for the indexing (`Foo[Bar]`) operation
674674
fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result;
675675
}
@@ -805,16 +805,6 @@ pub trait Deref<Sized? Result> {
805805
fn deref<'a>(&'a self) -> &'a Result;
806806
}
807807

808-
#[cfg(not(stage0))]
809-
impl<'a, Sized? T> Deref<T> for &'a T {
810-
fn deref(&self) -> &T { *self }
811-
}
812-
813-
#[cfg(not(stage0))]
814-
impl<'a, Sized? T> Deref<T> for &'a mut T {
815-
fn deref(&self) -> &T { *self }
816-
}
817-
818808
/**
819809
*
820810
* The `DerefMut` trait is used to specify the functionality of dereferencing
@@ -855,11 +845,6 @@ pub trait DerefMut<Sized? Result>: Deref<Result> {
855845
fn deref_mut<'a>(&'a mut self) -> &'a mut Result;
856846
}
857847

858-
#[cfg(not(stage0))]
859-
impl<'a, Sized? T> DerefMut<T> for &'a mut T {
860-
fn deref_mut(&mut self) -> &mut T { *self }
861-
}
862-
863848
/// A version of the call operator that takes an immutable receiver.
864849
#[lang="fn"]
865850
pub trait Fn<Args,Result> {

branches/auto/src/libcore/slice.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ pub trait SlicePrelude<T> for Sized? {
256256
#[inline]
257257
#[experimental = "not triaged yet"]
258258
fn is_empty(&self) -> bool { self.len() == 0 }
259+
259260
/// Returns a mutable reference to the element at the given index,
260261
/// or `None` if the index is out of bounds
261262
#[unstable = "waiting on final error conventions"]
@@ -697,22 +698,6 @@ impl<T> SlicePrelude<T> for [T] {
697698
}
698699
}
699700

700-
impl<T> ops::Index<uint, T> for [T] {
701-
fn index(&self, &index: &uint) -> &T {
702-
assert!(index < self.len());
703-
704-
unsafe { mem::transmute(self.repr().data.offset(index as int)) }
705-
}
706-
}
707-
708-
impl<T> ops::IndexMut<uint, T> for [T] {
709-
fn index_mut(&mut self, &index: &uint) -> &mut T {
710-
assert!(index < self.len());
711-
712-
unsafe { mem::transmute(self.repr().data.offset(index as int)) }
713-
}
714-
}
715-
716701
impl<T> ops::Slice<uint, [T]> for [T] {
717702
#[inline]
718703
fn as_slice_<'a>(&'a self) -> &'a [T] {

branches/auto/src/librustc/driver/driver.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ pub fn phase_2_configure_and_expand(sess: &Session,
212212
*ty == config::CrateTypeExecutable
213213
});
214214

215+
krate = time(time_passes, "crate injection", krate, |krate|
216+
syntax::std_inject::maybe_inject_crates_ref(krate,
217+
sess.opts.alt_std_name.clone(),
218+
any_exe));
219+
215220
// strip before expansion to allow macros to depend on
216221
// configuration variables e.g/ in
217222
//
@@ -223,11 +228,6 @@ pub fn phase_2_configure_and_expand(sess: &Session,
223228
krate = time(time_passes, "configuration 1", krate, |krate|
224229
syntax::config::strip_unconfigured_items(sess.diagnostic(), krate));
225230

226-
krate = time(time_passes, "crate injection", krate, |krate|
227-
syntax::std_inject::maybe_inject_crates_ref(krate,
228-
sess.opts.alt_std_name.clone(),
229-
any_exe));
230-
231231
let mut addl_plugins = Some(addl_plugins);
232232
let Plugins { macros, registrars }
233233
= time(time_passes, "plugin loading", (), |_|

branches/auto/src/librustc/middle/cfg/construct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
448448
}
449449

450450
ast::ExprStruct(_, ref fields, ref base) => {
451-
let field_cfg = self.straightline(expr, pred, fields.iter().map(|f| &*f.expr));
452-
self.opt_expr(base, field_cfg)
451+
let base_exit = self.opt_expr(base, pred);
452+
self.straightline(expr, base_exit, fields.iter().map(|f| &*f.expr))
453453
}
454454

455455
ast::ExprRepeat(ref elem, ref count) => {

branches/auto/src/librustc/middle/expr_use_visitor.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,6 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,TYPER> {
672672
}
673673
}
674674

675-
// walk the with expression so that complex expressions
676-
// are properly handled.
677-
self.walk_expr(with_expr);
678-
679675
fn contains_field_named(field: &ty::field,
680676
fields: &Vec<ast::Field>)
681677
-> bool

branches/auto/src/librustc/middle/traits/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub enum Vtable<N> {
176176
/// ID is the ID of the closure expression. This is a `VtableImpl`
177177
/// in spirit, but the impl is generated by the compiler and does
178178
/// not appear in the source.
179-
VtableUnboxedClosure(ast::DefId, subst::Substs),
179+
VtableUnboxedClosure(ast::DefId),
180180

181181
/// Successful resolution to an obligation provided by the caller
182182
/// for some type parameter.
@@ -338,7 +338,7 @@ impl<N> Vtable<N> {
338338
pub fn iter_nested(&self) -> Items<N> {
339339
match *self {
340340
VtableImpl(ref i) => i.iter_nested(),
341-
VtableUnboxedClosure(..) => (&[]).iter(),
341+
VtableUnboxedClosure(_) => (&[]).iter(),
342342
VtableParam(_) => (&[]).iter(),
343343
VtableBuiltin(ref i) => i.iter_nested(),
344344
}
@@ -347,7 +347,7 @@ impl<N> Vtable<N> {
347347
pub fn map_nested<M>(&self, op: |&N| -> M) -> Vtable<M> {
348348
match *self {
349349
VtableImpl(ref i) => VtableImpl(i.map_nested(op)),
350-
VtableUnboxedClosure(d, ref s) => VtableUnboxedClosure(d, s.clone()),
350+
VtableUnboxedClosure(d) => VtableUnboxedClosure(d),
351351
VtableParam(ref p) => VtableParam((*p).clone()),
352352
VtableBuiltin(ref i) => VtableBuiltin(i.map_nested(op)),
353353
}
@@ -356,7 +356,7 @@ impl<N> Vtable<N> {
356356
pub fn map_move_nested<M>(self, op: |N| -> M) -> Vtable<M> {
357357
match self {
358358
VtableImpl(i) => VtableImpl(i.map_move_nested(op)),
359-
VtableUnboxedClosure(d, s) => VtableUnboxedClosure(d, s),
359+
VtableUnboxedClosure(d) => VtableUnboxedClosure(d),
360360
VtableParam(p) => VtableParam(p),
361361
VtableBuiltin(i) => VtableBuiltin(i.map_move_nested(op)),
362362
}

branches/auto/src/librustc/middle/traits/select.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,9 +1582,9 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
15821582
Ok(VtableImpl(vtable_impl))
15831583
}
15841584

1585-
UnboxedClosureCandidate(closure_def_id, substs) => {
1586-
try!(self.confirm_unboxed_closure_candidate(obligation, closure_def_id, &substs));
1587-
Ok(VtableUnboxedClosure(closure_def_id, substs))
1585+
UnboxedClosureCandidate(closure_def_id, ref substs) => {
1586+
try!(self.confirm_unboxed_closure_candidate(obligation, closure_def_id, substs));
1587+
Ok(VtableUnboxedClosure(closure_def_id))
15881588
}
15891589
}
15901590
}

branches/auto/src/librustc/middle/traits/util.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,9 @@ impl<N:Repr> Repr for super::Vtable<N> {
311311
super::VtableImpl(ref v) =>
312312
v.repr(tcx),
313313

314-
super::VtableUnboxedClosure(ref d, ref s) =>
315-
format!("VtableUnboxedClosure({},{})",
316-
d.repr(tcx),
317-
s.repr(tcx)),
314+
super::VtableUnboxedClosure(ref d) =>
315+
format!("VtableUnboxedClosure({})",
316+
d.repr(tcx)),
318317

319318
super::VtableParam(ref v) =>
320319
format!("VtableParam({})", v.repr(tcx)),

0 commit comments

Comments
 (0)