Skip to content

Commit 0e8aeff

Browse files
committed
---
yaml --- r: 165411 b: refs/heads/master c: e0d4438 h: refs/heads/master i: 165409: aae7200 165407: a8b3566 v: v3
1 parent 45721df commit 0e8aeff

File tree

156 files changed

+1553
-2931
lines changed

Some content is hidden

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

156 files changed

+1553
-2931
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 2af8155bee8614a4e3bd1831f8927652c7475cc5
2+
refs/heads/master: e0d44386d334e13677e2d43ad9365d6b24350780
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
55
refs/heads/try: aee614fc4973262a5a68efc643026e2b1458d65b

trunk/mk/crates.mk

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test time rand \
5454
log regex graphviz core rbml alloc \
5555
unicode
56-
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
57-
rustc_trans rustc_back rustc_llvm
56+
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_driver rustc_trans rustc_back rustc_llvm
5857
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
5958
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
6059
TOOLS := compiletest rustdoc rustc
@@ -68,12 +67,11 @@ DEPS_std := core libc rand alloc collections unicode \
6867
DEPS_graphviz := std
6968
DEPS_syntax := std term serialize log fmt_macros arena libc
7069
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
71-
rustc_typeck rustc_resolve log syntax serialize rustc_llvm rustc_trans
70+
rustc_typeck log syntax serialize rustc_llvm rustc_trans
7271
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
7372
log syntax serialize rustc_llvm
7473
DEPS_rustc_typeck := rustc syntax
7574
DEPS_rustc_borrowck := rustc log graphviz syntax
76-
DEPS_rustc_resolve := rustc log syntax
7775
DEPS_rustc := syntax flate arena serialize getopts rbml \
7876
time log graphviz rustc_llvm rustc_back
7977
DEPS_rustc_llvm := native:rustllvm libc std
@@ -120,11 +118,9 @@ DOC_CRATES := $(filter-out rustc, \
120118
$(filter-out rustc_trans, \
121119
$(filter-out rustc_typeck, \
122120
$(filter-out rustc_borrowck, \
123-
$(filter-out rustc_resolve, \
124121
$(filter-out rustc_driver, \
125-
$(filter-out syntax, $(CRATES))))))))
126-
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
127-
rustc_typeck rustc_driver syntax
122+
$(filter-out syntax, $(CRATES)))))))
123+
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_typeck rustc_driver syntax
128124

129125
# This macro creates some simple definitions for each crate being built, just
130126
# some munging of all of the parameters above.

trunk/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ $(eval $(call RUST_CRATE,coretest))
2121

2222
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
24-
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans,\
25-
$(HOST_CRATES))
24+
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_trans,$(HOST_CRATES))
2625
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2726

2827
######################################################################

trunk/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@ fn _arm_exec_compiled_test(config: &Config,
16091609
stderr_out.as_slice());
16101610

16111611
ProcRes {
1612-
status: process::ProcessExit::ExitStatus(exitcode),
1612+
status: process::ExitStatus(exitcode),
16131613
stdout: stdout_out,
16141614
stderr: stderr_out,
16151615
cmdline: cmdline
@@ -1666,7 +1666,7 @@ fn compile_test_and_save_bitcode(config: &Config, props: &TestProps,
16661666
// FIXME (#9639): This needs to handle non-utf8 paths
16671667
let mut link_args = vec!("-L".to_string(),
16681668
aux_dir.as_str().unwrap().to_string());
1669-
let llvm_args = vec!("--emit=llvm-bc,obj".to_string(),
1669+
let llvm_args = vec!("--emit=bc,obj".to_string(),
16701670
"--crate-type=lib".to_string());
16711671
link_args.extend(llvm_args.into_iter());
16721672
let args = make_compile_args(config,

trunk/src/doc/guide.md

Lines changed: 78 additions & 76 deletions
Large diffs are not rendered by default.

trunk/src/doc/rust.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2+
* Copyright 2013 The Rust Project Developers. See the COPYRIGHT
33
* file at the top-level directory of this distribution and at
44
* http://rust-lang.org/COPYRIGHT.
55
* With elements taken from Bootstrap v3.0.2 (MIT licensed).
@@ -209,6 +209,7 @@ pre {
209209
code {
210210
padding: 0 2px;
211211
color: #8D1A38;
212+
white-space: pre-wrap;
212213
}
213214
pre code {
214215
padding: 0;

trunk/src/etc/rust-lldb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ TMPFILE=`mktemp /tmp/rust-lldb-commands.XXXXXX`
1919
trap "rm -f $TMPFILE; exit" INT TERM EXIT
2020

2121
# Find out where to look for the pretty printer Python module
22-
RUSTC_SYSROOT=`rustc --print sysroot`
22+
RUSTC_SYSROOT=`rustc -Zprint-sysroot`
2323

2424
# Write the LLDB script to the tempfile
2525
echo "command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_rust_formatters.py\"" >> $TMPFILE

trunk/src/libcollections/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use prelude::*;
11+
use std::prelude::*;
1212
use std::rand;
1313
use std::rand::Rng;
1414
use test::Bencher;

trunk/src/libcollections/binary_heap.rs

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -551,18 +551,9 @@ impl<T: Ord> BinaryHeap<T> {
551551
#[unstable = "matches collection reform specification, waiting for dust to settle"]
552552
pub fn is_empty(&self) -> bool { self.len() == 0 }
553553

554-
/// Clears the queue, returning an iterator over the removed elements.
555-
#[inline]
556-
#[unstable = "matches collection reform specification, waiting for dust to settle"]
557-
pub fn drain<'a>(&'a mut self) -> Drain<'a, T> {
558-
Drain {
559-
iter: self.data.drain(),
560-
}
561-
}
562-
563554
/// Drops all items from the queue.
564555
#[unstable = "matches collection reform specification, waiting for dust to settle"]
565-
pub fn clear(&mut self) { self.drain(); }
556+
pub fn clear(&mut self) { self.data.truncate(0) }
566557
}
567558

568559
/// `BinaryHeap` iterator.
@@ -605,26 +596,6 @@ impl<T> DoubleEndedIterator<T> for MoveItems<T> {
605596

606597
impl<T> ExactSizeIterator<T> for MoveItems<T> {}
607598

608-
/// An iterator that drains a `BinaryHeap`.
609-
pub struct Drain<'a, T: 'a> {
610-
iter: vec::Drain<'a, T>,
611-
}
612-
613-
impl<'a, T: 'a> Iterator<T> for Drain<'a, T> {
614-
#[inline]
615-
fn next(&mut self) -> Option<T> { self.iter.next() }
616-
617-
#[inline]
618-
fn size_hint(&self) -> (uint, Option<uint>) { self.iter.size_hint() }
619-
}
620-
621-
impl<'a, T: 'a> DoubleEndedIterator<T> for Drain<'a, T> {
622-
#[inline]
623-
fn next_back(&mut self) -> Option<T> { self.iter.next_back() }
624-
}
625-
626-
impl<'a, T: 'a> ExactSizeIterator<T> for Drain<'a, T> {}
627-
628599
impl<T: Ord> FromIterator<T> for BinaryHeap<T> {
629600
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> BinaryHeap<T> {
630601
let vec: Vec<T> = iter.collect();
@@ -646,9 +617,10 @@ impl<T: Ord> Extend<T> for BinaryHeap<T> {
646617

647618
#[cfg(test)]
648619
mod tests {
649-
use prelude::*;
620+
use std::prelude::*;
650621

651622
use super::BinaryHeap;
623+
use vec::Vec;
652624

653625
#[test]
654626
fn test_iterator() {
@@ -848,14 +820,4 @@ mod tests {
848820
assert_eq!(q.pop().unwrap(), x);
849821
}
850822
}
851-
852-
#[test]
853-
fn test_drain() {
854-
let mut q: BinaryHeap<_> =
855-
[9u, 8, 7, 6, 5, 4, 3, 2, 1].iter().cloned().collect();
856-
857-
assert_eq!(q.drain().take(5).count(), 5);
858-
859-
assert!(q.is_empty());
860-
}
861823
}

trunk/src/libcollections/bit.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,15 +1686,16 @@ impl<'a> Iterator<uint> for TwoBitPositions<'a> {
16861686

16871687
#[cfg(test)]
16881688
mod tests {
1689-
use prelude::*;
1690-
use core::iter::range_step;
1691-
use core::u32;
1689+
use std::prelude::*;
1690+
use std::iter::range_step;
16921691
use std::rand;
16931692
use std::rand::Rng;
1693+
use std::u32;
16941694
use test::{Bencher, black_box};
16951695

16961696
use super::{Bitv, BitvSet, from_fn, from_bytes};
16971697
use bitv;
1698+
use vec::Vec;
16981699

16991700
static BENCH_BITS : uint = 1 << 14;
17001701

@@ -2037,7 +2038,7 @@ mod tests {
20372038
#[test]
20382039
fn test_from_bytes() {
20392040
let bitv = from_bytes(&[0b10110110, 0b00000000, 0b11111111]);
2040-
let str = concat!("10110110", "00000000", "11111111");
2041+
let str = format!("{}{}{}", "10110110", "00000000", "11111111");
20412042
assert_eq!(bitv.to_string(), str);
20422043
}
20432044

trunk/src/libcollections/btree/map.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ pub enum Entry<'a, K:'a, V:'a> {
131131
/// A vacant Entry.
132132
pub struct VacantEntry<'a, K:'a, V:'a> {
133133
key: K,
134-
stack: stack::SearchStack<'a, K, V, node::handle::Edge, node::handle::Leaf>,
134+
stack: stack::SearchStack<'a, K, V, node::Edge, node::Leaf>,
135135
}
136136

137137
/// An occupied Entry.
138138
pub struct OccupiedEntry<'a, K:'a, V:'a> {
139-
stack: stack::SearchStack<'a, K, V, node::handle::KV, node::handle::LeafOrInternal>,
139+
stack: stack::SearchStack<'a, K, V, node::KV, node::LeafOrInternal>,
140140
}
141141

142142
impl<K: Ord, V> BTreeMap<K, V> {
@@ -496,8 +496,7 @@ mod stack {
496496
use core::kinds::marker;
497497
use core::mem;
498498
use super::BTreeMap;
499-
use super::super::node::{mod, Node, Fit, Split, Internal, Leaf};
500-
use super::super::node::handle;
499+
use super::super::node::{mod, Node, Fit, Split, KV, Edge, Internal, Leaf, LeafOrInternal};
501500
use vec::Vec;
502501

503502
/// A generic mutable reference, identical to `&mut` except for the fact that its lifetime
@@ -521,7 +520,7 @@ mod stack {
521520
}
522521
}
523522

524-
type StackItem<K, V> = node::Handle<*mut Node<K, V>, handle::Edge, handle::Internal>;
523+
type StackItem<K, V> = node::Handle<*mut Node<K, V>, Edge, Internal>;
525524
type Stack<K, V> = Vec<StackItem<K, V>>;
526525

527526
/// A `PartialSearchStack` handles the construction of a search stack.
@@ -596,9 +595,7 @@ mod stack {
596595
/// Pushes the requested child of the stack's current top on top of the stack. If the child
597596
/// exists, then a new PartialSearchStack is yielded. Otherwise, a VacantSearchStack is
598597
/// yielded.
599-
pub fn push(mut self, mut edge: node::Handle<IdRef<'id, Node<K, V>>,
600-
handle::Edge,
601-
handle::Internal>)
598+
pub fn push(mut self, mut edge: node::Handle<IdRef<'id, Node<K, V>>, Edge, Internal>)
602599
-> PartialSearchStack<'a, K, V> {
603600
self.stack.push(edge.as_raw());
604601
PartialSearchStack {
@@ -620,7 +617,7 @@ mod stack {
620617
}
621618
}
622619

623-
impl<'a, K, V, NodeType> SearchStack<'a, K, V, handle::KV, NodeType> {
620+
impl<'a, K, V, NodeType> SearchStack<'a, K, V, KV, NodeType> {
624621
/// Gets a reference to the value the stack points to.
625622
pub fn peek(&self) -> &V {
626623
unsafe { self.top.from_raw().into_kv().1 }
@@ -643,7 +640,7 @@ mod stack {
643640
}
644641
}
645642

646-
impl<'a, K, V> SearchStack<'a, K, V, handle::KV, handle::Leaf> {
643+
impl<'a, K, V> SearchStack<'a, K, V, KV, Leaf> {
647644
/// Removes the key and value in the top element of the stack, then handles underflows as
648645
/// described in BTree's pop function.
649646
fn remove_leaf(mut self) -> V {
@@ -689,7 +686,7 @@ mod stack {
689686
}
690687
}
691688

692-
impl<'a, K, V> SearchStack<'a, K, V, handle::KV, handle::LeafOrInternal> {
689+
impl<'a, K, V> SearchStack<'a, K, V, KV, LeafOrInternal> {
693690
/// Removes the key and value in the top element of the stack, then handles underflows as
694691
/// described in BTree's pop function.
695692
pub fn remove(self) -> V {
@@ -706,7 +703,7 @@ mod stack {
706703
/// leaves the tree in an inconsistent state that must be repaired by the caller by
707704
/// removing the entry in question. Specifically the key-value pair and its successor will
708705
/// become swapped.
709-
fn into_leaf(mut self) -> SearchStack<'a, K, V, handle::KV, handle::Leaf> {
706+
fn into_leaf(mut self) -> SearchStack<'a, K, V, KV, Leaf> {
710707
unsafe {
711708
let mut top_raw = self.top;
712709
let mut top = top_raw.from_raw_mut();
@@ -760,7 +757,7 @@ mod stack {
760757
}
761758
}
762759

763-
impl<'a, K, V> SearchStack<'a, K, V, handle::Edge, handle::Leaf> {
760+
impl<'a, K, V> SearchStack<'a, K, V, Edge, Leaf> {
764761
/// Inserts the key and value into the top element in the stack, and if that node has to
765762
/// split recursively inserts the split contents into the next element stack until
766763
/// splits stop.
@@ -1335,7 +1332,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
13351332

13361333
#[cfg(test)]
13371334
mod test {
1338-
use prelude::*;
1335+
use std::prelude::*;
13391336

13401337
use super::{BTreeMap, Occupied, Vacant};
13411338

@@ -1537,7 +1534,7 @@ mod test {
15371534

15381535
#[cfg(test)]
15391536
mod bench {
1540-
use prelude::*;
1537+
use std::prelude::*;
15411538
use std::rand::{weak_rng, Rng};
15421539
use test::{Bencher, black_box};
15431540

0 commit comments

Comments
 (0)