Skip to content

Commit e77e528

Browse files
committed
---
yaml --- r: 109499 b: refs/heads/dist-snap c: cbbc1fc h: refs/heads/master i: 109497: 57088ef 109495: 63ebc65 v: v3
1 parent aa14d61 commit e77e528

Some content is hidden

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

49 files changed

+188
-285
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: abb616209d23f0883f4e96253c4233c29741fc7d
9+
refs/heads/dist-snap: cbbc1fc843a0bea0191f66b76ff6fcc9005d7b0f
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt \
171171
--resources tmp/dist/pkgres-$(1) dist/$(PKG_NAME)-$(1).pkg
172172
$(Q)rm -rf tmp rust.pkg
173173

174-
tmp/dist/pkgres-$(1)/LICENSE.txt: LICENSE.txt
174+
tmp/dist/pkgres-$(1)/LICENSE.txt: $(S)/LICENSE.txt
175175
@$$(call E,pkg resource LICENSE.txt)
176176
$(Q)mkdir -p $$(@D)
177177
$(Q)cp $$< $$@

branches/dist-snap/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ endif
1717
install: dist-install-dir-$(CFG_BUILD)
1818
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
1919
# Remove tmp files while we can because they may have been created under sudo
20-
$(Q)rm -R tmp/dist
20+
$(Q)rm -R tmp/dist/$(PKG_NAME)-$(CFG_BUILD)
2121

2222
uninstall: dist-install-dir-$(CFG_BUILD)
2323
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2424
# Remove tmp files while we can because they may have been created under sudo
25-
$(Q)rm -R tmp/dist
25+
$(Q)rm -R tmp/dist/$(PKG_NAME)-$(CFG_BUILD)
2626

2727

2828
######################################################################

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

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

1615
#[cfg(target_os = "win32")]
1716
fn target_env(lib_path: &str, prog: &str) -> Vec<(~str,~str)> {
@@ -66,8 +65,7 @@ pub fn run(lib_path: &str,
6665
env: Vec<(~str, ~str)> ,
6766
input: Option<~str>) -> Option<Result> {
6867

69-
let env = vec::append(env.clone(),
70-
target_env(lib_path, prog).as_slice());
68+
let env = env.clone().append(target_env(lib_path, prog).as_slice());
7169
let mut opt_process = Process::configure(ProcessConfig {
7270
program: prog,
7371
args: args,
@@ -98,8 +96,7 @@ pub fn run_background(lib_path: &str,
9896
env: Vec<(~str, ~str)> ,
9997
input: Option<~str>) -> Option<Process> {
10098

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

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

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

3938
pub fn run(config: config, testfile: ~str) {
@@ -683,7 +682,7 @@ fn compile_test_(config: &config, props: &TestProps,
683682
let link_args = vec!(~"-L", aux_dir.as_str().unwrap().to_owned());
684683
let args = make_compile_args(config,
685684
props,
686-
vec::append(link_args, extra_args),
685+
link_args.append(extra_args),
687686
|a, b| ThisFile(make_exe_name(a, b)), testfile);
688687
compose_and_run_compiler(config, props, testfile, args, None)
689688
}
@@ -734,8 +733,7 @@ fn compose_and_run_compiler(
734733
let aux_args =
735734
make_compile_args(config,
736735
&aux_props,
737-
vec::append(crate_type,
738-
extra_link_args.as_slice()),
736+
crate_type.append(extra_link_args.as_slice()),
739737
|a,b| {
740738
let f = make_lib_name(a, b, testfile);
741739
ThisDirectory(f.dir_path())
@@ -1108,8 +1106,7 @@ fn compile_test_and_save_bitcode(config: &config, props: &TestProps,
11081106
let llvm_args = vec!(~"--emit=obj", ~"--crate-type=lib", ~"-C", ~"save-temps");
11091107
let args = make_compile_args(config,
11101108
props,
1111-
vec::append(link_args,
1112-
llvm_args.as_slice()),
1109+
link_args.append(llvm_args.as_slice()),
11131110
|a, b| ThisFile(make_o_name(a, b)), testfile);
11141111
compose_and_run_compiler(config, props, testfile, args, None)
11151112
}

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/etc/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ putvar() {
4545
else
4646
printf "install: %-20s := %s %s\n" $1 "$T" "$2"
4747
fi
48+
printf "%-20s := %s\n" $1 "$T" >>config.tmp
4849
}
4950

5051
valopt() {

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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use rand::Rng;
2828
use std::str;
2929
use std::uint;
3030
use std::{i64, u64};
31-
use std::vec;
3231

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

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

754752
#[inline]

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

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

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

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

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

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

1212
use driver::session::Session;
1313

14-
use std::vec;
1514
use syntax::ast;
1615
use syntax::attr;
1716
use syntax::codemap::DUMMY_SP;
@@ -173,7 +172,7 @@ impl<'a> fold::Folder for PreludeInjector<'a> {
173172
span: DUMMY_SP,
174173
};
175174

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

178177
// FIXME #2543: Bad copy.
179178
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: vec::append_one(m.items.clone(), testmod),
275+
items: m.items.clone().append_one(testmod),
276276
..(*m).clone()
277277
}
278278
}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use std::io;
5454
use std::os;
5555
use std::str;
5656
use std::task;
57-
use std::vec;
5857
use syntax::ast;
5958
use syntax::diagnostic::Emitter;
6059
use syntax::diagnostic;
@@ -239,9 +238,7 @@ pub fn run_compiler(args: &[~str]) {
239238
return;
240239
}
241240

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

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

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

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

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

10098
pub enum found_ast {

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

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

15-
use std::vec;
1615
use middle::borrowck::*;
1716
use mc = middle::mem_categorization;
1817
use middle::ty;
@@ -173,11 +172,7 @@ impl<'a> RestrictionsContext<'a> {
173172
Safe => Safe,
174173
SafeIf(base_lp, base_vec) => {
175174
let lp = @LpExtend(base_lp, mc, elem);
176-
SafeIf(lp, vec::append_one(base_vec,
177-
Restriction {
178-
loan_path: lp,
179-
set: restrictions
180-
}))
175+
SafeIf(lp, base_vec.append_one(Restriction { loan_path: lp, set: restrictions }))
181176
}
182177
}
183178
}

0 commit comments

Comments
 (0)