Skip to content

Commit d3699ff

Browse files
committed
---
yaml --- r: 109501 b: refs/heads/dist-snap c: 45f2d83 h: refs/heads/master i: 109499: e77e528 v: v3
1 parent d6560d8 commit d3699ff

Some content is hidden

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

47 files changed

+281
-186
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 1c2ccf0503b7a74e94c8e57136a0878c6bcf30df
9+
refs/heads/dist-snap: 45f2d83d3c7f887d946d8950bbfe59519d3e2412
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ PKG_FILES := \
5353
driver \
5454
etc \
5555
$(foreach crate,$(CRATES),lib$(crate)) \
56+
libbacktrace \
5657
rt \
5758
rustllvm \
5859
snapshots.txt \

branches/dist-snap/src/compiletest/procsrv.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use std::os;
1212
use std::str;
1313
use std::io::process::{ProcessExit, Process, ProcessConfig, ProcessOutput};
14+
use std::vec;
1415

1516
#[cfg(target_os = "win32")]
1617
fn target_env(lib_path: &str, prog: &str) -> Vec<(~str,~str)> {
@@ -65,7 +66,8 @@ pub fn run(lib_path: &str,
6566
env: Vec<(~str, ~str)> ,
6667
input: Option<~str>) -> Option<Result> {
6768

68-
let env = env.clone().append(target_env(lib_path, prog).as_slice());
69+
let env = vec::append(env.clone(),
70+
target_env(lib_path, prog).as_slice());
6971
let mut opt_process = Process::configure(ProcessConfig {
7072
program: prog,
7173
args: args,
@@ -96,7 +98,8 @@ pub fn run_background(lib_path: &str,
9698
env: Vec<(~str, ~str)> ,
9799
input: Option<~str>) -> Option<Process> {
98100

99-
let env = env.clone().append(target_env(lib_path, prog).as_slice());
101+
let env = vec::append(env.clone(),
102+
target_env(lib_path, prog).as_slice());
100103
let opt_process = Process::configure(ProcessConfig {
101104
program: prog,
102105
args: args,

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use std::os;
3333
use std::str;
3434
use std::task;
3535
use std::slice;
36+
use std::vec;
3637
use test::MetricMap;
3738

3839
pub fn run(config: config, testfile: ~str) {
@@ -682,7 +683,7 @@ fn compile_test_(config: &config, props: &TestProps,
682683
let link_args = vec!(~"-L", aux_dir.as_str().unwrap().to_owned());
683684
let args = make_compile_args(config,
684685
props,
685-
link_args.append(extra_args),
686+
vec::append(link_args, extra_args),
686687
|a, b| ThisFile(make_exe_name(a, b)), testfile);
687688
compose_and_run_compiler(config, props, testfile, args, None)
688689
}
@@ -733,7 +734,8 @@ fn compose_and_run_compiler(
733734
let aux_args =
734735
make_compile_args(config,
735736
&aux_props,
736-
crate_type.append(extra_link_args.as_slice()),
737+
vec::append(crate_type,
738+
extra_link_args.as_slice()),
737739
|a,b| {
738740
let f = make_lib_name(a, b, testfile);
739741
ThisDirectory(f.dir_path())
@@ -1106,7 +1108,8 @@ fn compile_test_and_save_bitcode(config: &config, props: &TestProps,
11061108
let llvm_args = vec!(~"--emit=obj", ~"--crate-type=lib", ~"-C", ~"save-temps");
11071109
let args = make_compile_args(config,
11081110
props,
1109-
link_args.append(llvm_args.as_slice()),
1111+
vec::append(link_args,
1112+
llvm_args.as_slice()),
11101113
|a, b| ThisFile(make_o_name(a, b)), testfile);
11111114
compose_and_run_compiler(config, props, testfile, args, None)
11121115
}

branches/dist-snap/src/doc/guide-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ vectors is as follows:
278278
279279
~~~ {.ignore}
280280
impl<A> FromIterator<A> for ~[A] {
281-
pub fn from_iter<T: Iterator<A>>(iterator: &mut T) -> ~[A] {
281+
pub fn from_iterator<T: Iterator<A>>(iterator: &mut T) -> ~[A] {
282282
let (lower, _) = iterator.size_hint();
283283
let mut xs = with_capacity(lower);
284284
for x in iterator {

branches/dist-snap/src/libcollections/dlist.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ impl<A> DoubleEndedIterator<A> for MoveItems<A> {
582582
}
583583

584584
impl<A> FromIterator<A> for DList<A> {
585-
fn from_iter<T: Iterator<A>>(iterator: T) -> DList<A> {
585+
fn from_iterator<T: Iterator<A>>(iterator: T) -> DList<A> {
586586
let mut ret = DList::new();
587587
ret.extend(iterator);
588588
ret

branches/dist-snap/src/libcollections/hashmap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ pub type Values<'a, K, V> =
13561356
iter::Map<'static, (&'a K, &'a V), &'a V, Entries<'a, K, V>>;
13571357

13581358
impl<K: TotalEq + Hash<S>, V, S, H: Hasher<S> + Default> FromIterator<(K, V)> for HashMap<K, V, H> {
1359-
fn from_iter<T: Iterator<(K, V)>>(iter: T) -> HashMap<K, V, H> {
1359+
fn from_iterator<T: Iterator<(K, V)>>(iter: T) -> HashMap<K, V, H> {
13601360
let (lower, _) = iter.size_hint();
13611361
let mut map = HashMap::with_capacity_and_hasher(lower, Default::default());
13621362
map.extend(iter);
@@ -1540,7 +1540,7 @@ impl<T: TotalEq + Hash<S> + fmt::Show, S, H: Hasher<S>> fmt::Show for HashSet<T,
15401540
}
15411541

15421542
impl<T: TotalEq + Hash<S>, S, H: Hasher<S> + Default> FromIterator<T> for HashSet<T, H> {
1543-
fn from_iter<I: Iterator<T>>(iter: I) -> HashSet<T, H> {
1543+
fn from_iterator<I: Iterator<T>>(iter: I) -> HashSet<T, H> {
15441544
let (lower, _) = iter.size_hint();
15451545
let mut set = HashSet::with_capacity_and_hasher(lower, Default::default());
15461546
set.extend(iter);

branches/dist-snap/src/libcollections/priority_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl<'a, T> Iterator<&'a T> for Items<'a, T> {
193193
}
194194

195195
impl<T: Ord> FromIterator<T> for PriorityQueue<T> {
196-
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> PriorityQueue<T> {
196+
fn from_iterator<Iter: Iterator<T>>(iter: Iter) -> PriorityQueue<T> {
197197
let mut q = PriorityQueue::new();
198198
q.extend(iter);
199199
q

branches/dist-snap/src/libcollections/ringbuf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ impl<A: Eq> Eq for RingBuf<A> {
386386
}
387387

388388
impl<A> FromIterator<A> for RingBuf<A> {
389-
fn from_iter<T: Iterator<A>>(iterator: T) -> RingBuf<A> {
389+
fn from_iterator<T: Iterator<A>>(iterator: T) -> RingBuf<A> {
390390
let (lower, _) = iterator.size_hint();
391391
let mut deq = RingBuf::with_capacity(lower);
392392
deq.extend(iterator);
@@ -778,7 +778,7 @@ mod tests {
778778
}
779779

780780
#[test]
781-
fn test_from_iter() {
781+
fn test_from_iterator() {
782782
use std::iter;
783783
let v = ~[1,2,3,4,5,6,7];
784784
let deq: RingBuf<int> = v.iter().map(|&x| x).collect();

branches/dist-snap/src/libcollections/treemap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ fn remove<K: TotalOrd, V>(node: &mut Option<~TreeNode<K, V>>,
971971
}
972972

973973
impl<K: TotalOrd, V> FromIterator<(K, V)> for TreeMap<K, V> {
974-
fn from_iter<T: Iterator<(K, V)>>(iter: T) -> TreeMap<K, V> {
974+
fn from_iterator<T: Iterator<(K, V)>>(iter: T) -> TreeMap<K, V> {
975975
let mut map = TreeMap::new();
976976
map.extend(iter);
977977
map
@@ -988,7 +988,7 @@ impl<K: TotalOrd, V> Extendable<(K, V)> for TreeMap<K, V> {
988988
}
989989

990990
impl<T: TotalOrd> FromIterator<T> for TreeSet<T> {
991-
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> TreeSet<T> {
991+
fn from_iterator<Iter: Iterator<T>>(iter: Iter) -> TreeSet<T> {
992992
let mut set = TreeSet::new();
993993
set.extend(iter);
994994
set

branches/dist-snap/src/libcollections/trie.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl<T> TrieMap<T> {
261261
}
262262

263263
impl<T> FromIterator<(uint, T)> for TrieMap<T> {
264-
fn from_iter<Iter: Iterator<(uint, T)>>(iter: Iter) -> TrieMap<T> {
264+
fn from_iterator<Iter: Iterator<(uint, T)>>(iter: Iter) -> TrieMap<T> {
265265
let mut map = TrieMap::new();
266266
map.extend(iter);
267267
map
@@ -346,7 +346,7 @@ impl TrieSet {
346346
}
347347

348348
impl FromIterator<uint> for TrieSet {
349-
fn from_iter<Iter: Iterator<uint>>(iter: Iter) -> TrieSet {
349+
fn from_iterator<Iter: Iterator<uint>>(iter: Iter) -> TrieSet {
350350
let mut set = TrieSet::new();
351351
set.extend(iter);
352352
set

branches/dist-snap/src/libnum/bigint.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use rand::Rng;
2828
use std::str;
2929
use std::uint;
3030
use std::{i64, u64};
31+
use std::vec;
3132

3233
/**
3334
A `BigDigit` is a `BigUint`'s composing element.
@@ -746,7 +747,8 @@ impl BigUint {
746747
fn shl_unit(&self, n_unit: uint) -> BigUint {
747748
if n_unit == 0 || self.is_zero() { return (*self).clone(); }
748749

749-
BigUint::new(Vec::from_elem(n_unit, ZERO_BIG_DIGIT).append(self.data.as_slice()))
750+
return BigUint::new(vec::append(Vec::from_elem(n_unit, ZERO_BIG_DIGIT),
751+
self.data.as_slice()));
750752
}
751753

752754
#[inline]

branches/dist-snap/src/librustc/driver/driver.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ use std::io::fs;
3737
use std::io::MemReader;
3838
use std::mem::drop;
3939
use std::os;
40+
use std::vec;
4041
use getopts::{optopt, optmulti, optflag, optflagopt};
4142
use getopts;
4243
use syntax::ast;
@@ -136,7 +137,8 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig {
136137
} else {
137138
InternedString::new("nogc")
138139
});
139-
user_cfg.move_iter().collect::<Vec<_>>().append(default_cfg.as_slice())
140+
return vec::append(user_cfg.move_iter().collect(),
141+
default_cfg.as_slice());
140142
}
141143

142144
// Convert strings provided as --cfg [cfgspec] into a crate_cfg
@@ -834,7 +836,9 @@ pub fn build_session_options(matches: &getopts::Matches) -> session::Options {
834836

835837
let level_short = level_name.slice_chars(0, 1);
836838
let level_short = level_short.to_ascii().to_upper().into_str();
837-
let flags = matches.opt_strs(level_short).move_iter().collect::<Vec<_>>().append(
839+
let flags = vec::append(matches.opt_strs(level_short)
840+
.move_iter()
841+
.collect(),
838842
matches.opt_strs(level_name).as_slice());
839843
for lint_name in flags.iter() {
840844
let lint_name = lint_name.replace("-", "_");

branches/dist-snap/src/librustc/front/std_inject.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use driver::session::Session;
1313

14+
use std::vec;
1415
use syntax::ast;
1516
use syntax::attr;
1617
use syntax::codemap::DUMMY_SP;
@@ -172,7 +173,7 @@ impl<'a> fold::Folder for PreludeInjector<'a> {
172173
span: DUMMY_SP,
173174
};
174175

175-
let vis = (vec!(vi2)).append(module.view_items.as_slice());
176+
let vis = vec::append(vec!(vi2), module.view_items.as_slice());
176177

177178
// FIXME #2543: Bad copy.
178179
let new_module = ast::Mod {

branches/dist-snap/src/librustc/front/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fn should_fail(i: @ast::Item) -> bool {
272272
fn add_test_module(cx: &TestCtxt, m: &ast::Mod) -> ast::Mod {
273273
let testmod = mk_test_module(cx);
274274
ast::Mod {
275-
items: m.items.clone().append_one(testmod),
275+
items: vec::append_one(m.items.clone(), testmod),
276276
..(*m).clone()
277277
}
278278
}

branches/dist-snap/src/librustc/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ use std::io;
5454
use std::os;
5555
use std::str;
5656
use std::task;
57+
use std::vec;
5758
use syntax::ast;
5859
use syntax::diagnostic::Emitter;
5960
use syntax::diagnostic;
@@ -238,7 +239,9 @@ pub fn run_compiler(args: &[~str]) {
238239
return;
239240
}
240241

241-
let lint_flags = matches.opt_strs("W").move_iter().collect::<Vec<_>>().append(
242+
let lint_flags = vec::append(matches.opt_strs("W")
243+
.move_iter()
244+
.collect(),
242245
matches.opt_strs("warn").as_slice());
243246
if lint_flags.iter().any(|x| x == &~"help") {
244247
describe_warnings();

branches/dist-snap/src/librustc/metadata/csearch.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use middle::typeck;
2020

2121
use reader = serialize::ebml::reader;
2222
use std::rc::Rc;
23+
use std::vec;
2324
use syntax::ast;
2425
use syntax::ast_map;
2526
use syntax::diagnostic::expect;
@@ -92,7 +93,8 @@ pub fn get_item_path(tcx: &ty::ctxt, def: ast::DefId) -> Vec<ast_map::PathElem>
9293

9394
// FIXME #1920: This path is not always correct if the crate is not linked
9495
// into the root namespace.
95-
(vec!(ast_map::PathMod(token::intern(cdata.name)))).append(path.as_slice())
96+
vec::append(vec!(ast_map::PathMod(token::intern(cdata.name))),
97+
path.as_slice())
9698
}
9799

98100
pub enum found_ast {

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/restrictions.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Computes the restrictions that result from a borrow.
1313
*/
1414

15+
use std::vec;
1516
use middle::borrowck::*;
1617
use mc = middle::mem_categorization;
1718
use middle::ty;
@@ -172,7 +173,11 @@ impl<'a> RestrictionsContext<'a> {
172173
Safe => Safe,
173174
SafeIf(base_lp, base_vec) => {
174175
let lp = @LpExtend(base_lp, mc, elem);
175-
SafeIf(lp, base_vec.append_one(Restriction { loan_path: lp, set: restrictions }))
176+
SafeIf(lp, vec::append_one(base_vec,
177+
Restriction {
178+
loan_path: lp,
179+
set: restrictions
180+
}))
176181
}
177182
}
178183
}

branches/dist-snap/src/librustc/middle/check_match.rs

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ use util::ppaux::ty_to_str;
2121

2222
use std::cmp;
2323
use std::iter;
24+
use std::vec;
2425
use syntax::ast::*;
2526
use syntax::ast_util::{unguarded_pat, walk_pat};
2627
use syntax::codemap::{DUMMY_SP, Span};
@@ -559,10 +560,11 @@ fn specialize(cx: &MatchCheckCtxt,
559560
Pat{id: pat_id, node: n, span: pat_span} =>
560561
match n {
561562
PatWild => {
562-
Some(Vec::from_elem(arity, wild()).append(r.tail()))
563+
Some(vec::append(Vec::from_elem(arity, wild()), r.tail()))
563564
}
564565
PatWildMulti => {
565-
Some(Vec::from_elem(arity, wild_multi()).append(r.tail()))
566+
Some(vec::append(Vec::from_elem(arity, wild_multi()),
567+
r.tail()))
566568
}
567569
PatIdent(_, _, _) => {
568570
let opt_def = cx.tcx.def_map.borrow().find_copy(&pat_id);
@@ -613,7 +615,12 @@ fn specialize(cx: &MatchCheckCtxt,
613615
}
614616
}
615617
_ => {
616-
Some(Vec::from_elem(arity, wild()).append(r.tail()))
618+
Some(
619+
vec::append(
620+
Vec::from_elem(arity, wild()),
621+
r.tail()
622+
)
623+
)
617624
}
618625
}
619626
}
@@ -660,7 +667,7 @@ fn specialize(cx: &MatchCheckCtxt,
660667
Some(args) => args.iter().map(|x| *x).collect(),
661668
None => Vec::from_elem(arity, wild())
662669
};
663-
Some(args.append(r.tail()))
670+
Some(vec::append(args, r.tail()))
664671
}
665672
DefVariant(_, _, _) => None,
666673

@@ -673,7 +680,7 @@ fn specialize(cx: &MatchCheckCtxt,
673680
}
674681
None => new_args = Vec::from_elem(arity, wild())
675682
}
676-
Some(new_args.append(r.tail()))
683+
Some(vec::append(new_args, r.tail()))
677684
}
678685
_ => None
679686
}
@@ -690,8 +697,8 @@ fn specialize(cx: &MatchCheckCtxt,
690697
Some(f) => f.pat,
691698
_ => wild()
692699
}
693-
}).collect::<Vec<_>>();
694-
Some(args.append(r.tail()))
700+
}).collect();
701+
Some(vec::append(args, r.tail()))
695702
} else {
696703
None
697704
}
@@ -721,16 +728,16 @@ fn specialize(cx: &MatchCheckCtxt,
721728
Some(f) => f.pat,
722729
_ => wild()
723730
}
724-
}).collect::<Vec<_>>();
725-
Some(args.append(r.tail()))
731+
}).collect();
732+
Some(vec::append(args, r.tail()))
726733
}
727734
}
728735
}
729736
PatTup(args) => {
730-
Some(args.iter().map(|x| *x).collect::<Vec<_>>().append(r.tail()))
737+
Some(vec::append(args.iter().map(|x| *x).collect(), r.tail()))
731738
}
732739
PatUniq(a) | PatRegion(a) => {
733-
Some((vec!(a)).append(r.tail()))
740+
Some(vec::append(vec!(a), r.tail()))
734741
}
735742
PatLit(expr) => {
736743
let e_v = eval_const_expr(cx.tcx, expr);

0 commit comments

Comments
 (0)