Skip to content

Commit 8e3c4c0

Browse files
committed
---
yaml --- r: 125811 b: refs/heads/try c: d36a8f3 h: refs/heads/master i: 125809: 6e01b5a 125807: 3f0bb99 v: v3
1 parent 94632a1 commit 8e3c4c0

35 files changed

+169
-116
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f2fa55903e378368ed9173560f03a0ef16e371c2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: b3a732a3eab60862068b1006973de5924bcda9e2
5+
refs/heads/try: d36a8f3f9c70c63ed9042d83cdc47392d12b3886
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ opt rpath 0 "build rpaths into rustc itself"
422422
opt nightly 0 "build nightly packages"
423423
opt verify-install 1 "verify installed binaries work"
424424
opt jemalloc 1 "build liballoc with jemalloc"
425-
# This is used by the automation to produce single-target nightlies
426-
opt dist-host-only 0 "only install bins for the host architecture"
427425
valopt prefix "/usr/local" "set installation prefix"
428426
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
429427
valopt llvm-root "" "set LLVM root"

branches/try/mk/dist.mk

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ define DEF_OSX_PKG
156156
$$(eval $$(call DEF_PREPARE,osx-$(1)))
157157

158158
dist-prepare-osx-$(1): PREPARE_HOST=$(1)
159-
dist-prepare-osx-$(1): PREPARE_TARGETS=$(2)
159+
dist-prepare-osx-$(1): PREPARE_TARGETS=$(1)
160160
dist-prepare-osx-$(1): PREPARE_DEST_DIR=tmp/dist/pkgroot-$(1)
161161
dist-prepare-osx-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
162162
dist-prepare-osx-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
@@ -187,11 +187,7 @@ tmp/dist/pkgres-$(1)/%: $(S)src/etc/pkg/%
187187

188188
endef
189189

190-
ifneq ($(CFG_ENABLE_DIST_HOST_ONLY),)
191-
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host),$(host))))
192-
else
193-
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host),$(TARGET))))
194-
endif
190+
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))
195191

196192
dist-osx: $(foreach host,$(CFG_HOST),dist/$(PKG_NAME)-$(host).pkg)
197193

@@ -209,19 +205,17 @@ distcheck-osx: dist-osx
209205
# Unix binary installer tarballs
210206
######################################################################
211207

212-
define DEF_INSTALLER
213-
214-
$$(eval $$(call DEF_PREPARE,dir-$(1)))
215-
216-
dist-install-dir-$(1): PREPARE_HOST=$(1)
217-
dist-install-dir-$(1): PREPARE_TARGETS=$(2)
218-
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
219-
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
220-
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
221-
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
222-
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
223-
dist-install-dir-$(1): PREPARE_CLEAN=true
224-
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
208+
define DEF_PREPARE_DIST_DIR
209+
210+
dist-install-dir-$(1)$(3): PREPARE_HOST=$(1)
211+
dist-install-dir-$(1)$(3): PREPARE_TARGETS=$(2)
212+
dist-install-dir-$(1)$(3): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
213+
dist-install-dir-$(1)$(3): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
214+
dist-install-dir-$(1)$(3): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
215+
dist-install-dir-$(1)$(3): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
216+
dist-install-dir-$(1)$(3): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
217+
dist-install-dir-$(1)$(3): PREPARE_CLEAN=true
218+
dist-install-dir-$(1)$(3): prepare-base-dir-$(1) docs compiler-docs
225219
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
226220
> tmp/dist/manifest-$(1).in
227221
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
@@ -233,19 +227,24 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
233227
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
234228
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
235229

230+
endef
231+
232+
define DEF_INSTALLER
233+
234+
$$(eval $$(call DEF_PREPARE,dir-$(1)))
235+
236+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(1),))
237+
238+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(CFG_TARGET),-with-target-libs))
239+
236240
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
237241
@$(call E, build: $$@)
238242
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)
239243

240244
endef
241245

242-
ifneq ($(CFG_ENABLE_DIST_HOST_ONLY),)
243-
$(foreach host,$(CFG_HOST),\
244-
$(eval $(call DEF_INSTALLER,$(host),$(host))))
245-
else
246246
$(foreach host,$(CFG_HOST),\
247-
$(eval $(call DEF_INSTALLER,$(host),$(CFG_TARGET))))
248-
endif
247+
$(eval $(call DEF_INSTALLER,$(host))))
249248

250249
dist-install-dirs: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
251250

branches/try/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
17+
install: dist-install-dir-$(CFG_BUILD)-with-target-libs | tmp/empty_dir
1818
$(Q)cd tmp/empty_dir && 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
2020
$(Q)rm -R tmp/dist
2121

22-
uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
22+
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs | tmp/empty_dir
2323
$(Q)cd tmp/empty_dir && 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
2525
$(Q)rm -R tmp/dist

branches/try/src/liballoc/arc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ impl<T: Share + Send> Drop for Weak<T> {
268268
#[allow(experimental)]
269269
mod tests {
270270
use std::clone::Clone;
271+
use std::collections::MutableSeq;
271272
use std::comm::channel;
272273
use std::mem::drop;
273274
use std::ops::Drop;

branches/try/src/libcollections/bitv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use core::slice;
7272
use core::uint;
7373
use std::hash;
7474

75-
use {Collection, Mutable, Set, MutableSet};
75+
use {Collection, Mutable, Set, MutableSet, MutableSeq};
7676
use vec::Vec;
7777

7878

branches/try/src/libcollections/btree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use alloc::boxed::Box;
2424
use core::fmt;
2525
use core::fmt::Show;
2626

27-
use Collection;
27+
use {Collection, MutableSeq};
2828
use vec::Vec;
2929

3030
#[allow(missing_doc)]

branches/try/src/libcollections/dlist.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use core::iter;
3030
use core::mem;
3131
use core::ptr;
3232

33-
use {Collection, Mutable, Deque};
33+
use {Collection, Mutable, Deque, MutableSeq};
3434

3535
/// A doubly-linked list.
3636
pub struct DList<T> {
@@ -265,6 +265,11 @@ impl<T> Deque<T> for DList<T> {
265265
}
266266
}
267267

268+
impl<T> MutableSeq<T> for DList<T> {
269+
fn push(&mut self, elt: T) { self.push_back(elt) }
270+
fn pop(&mut self) -> Option<T> { self.pop_back() }
271+
}
272+
268273
impl<T> Default for DList<T> {
269274
#[inline]
270275
fn default() -> DList<T> { DList::new() }
@@ -719,7 +724,7 @@ mod tests {
719724
use test::Bencher;
720725
use test;
721726

722-
use Deque;
727+
use {Deque, MutableSeq};
723728
use super::{DList, Node, ListInsertion};
724729
use vec::Vec;
725730

branches/try/src/libcollections/hash/sip.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ mod tests {
281281
use super::super::{Hash, Writer};
282282
use super::{SipState, hash, hash_with_keys};
283283

284+
use MutableSeq;
285+
284286
// Hash just the bytes of the slice, without length prefix
285287
struct Bytes<'a>(&'a [u8]);
286288

branches/try/src/libcollections/lib.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@ pub trait MutableSet<T>: Set<T> + Mutable {
325325
fn remove(&mut self, value: &T) -> bool;
326326
}
327327

328+
pub trait MutableSeq<T>: Mutable {
329+
fn push(&mut self, t: T);
330+
fn pop(&mut self) -> Option<T>;
331+
}
332+
328333
/// A double-ended sequence that allows querying, insertion and deletion at both
329334
/// ends.
330335
///
@@ -384,7 +389,7 @@ pub trait MutableSet<T>: Set<T> + Mutable {
384389
/// println!("{}", (f, b));
385390
/// }
386391
/// ```
387-
pub trait Deque<T> : Mutable {
392+
pub trait Deque<T> : MutableSeq<T> {
388393
/// Provide a reference to the front element, or `None` if the sequence is
389394
/// empty.
390395
///
@@ -535,4 +540,8 @@ mod std {
535540
pub use core::clone; // deriving(Clone)
536541
pub use core::cmp; // deriving(Eq, Ord, etc.)
537542
pub use hash; // deriving(Hash)
543+
544+
pub mod collections {
545+
pub use MutableSeq;
546+
}
538547
}

branches/try/src/libcollections/macros.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,26 @@
1111
#![macro_escape]
1212

1313
/// Create a `std::vec::Vec` containing the arguments.
14+
#[cfg(not(test))]
1415
macro_rules! vec(
1516
($($e:expr),*) => ({
17+
#[allow(unused_imports)]
18+
use std::collections::MutableSeq;
19+
20+
// leading _ to allow empty construction without a warning.
21+
let mut _temp = ::vec::Vec::new();
22+
$(_temp.push($e);)*
23+
_temp
24+
});
25+
($($e:expr),+,) => (vec!($($e),+))
26+
)
27+
28+
#[cfg(test)]
29+
macro_rules! vec(
30+
($($e:expr),*) => ({
31+
#[allow(unused_imports)]
32+
use MutableSeq;
33+
1634
// leading _ to allow empty construction without a warning.
1735
let mut _temp = ::vec::Vec::new();
1836
$(_temp.push($e);)*

branches/try/src/libcollections/priority_queue.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ use core::default::Default;
154154
use core::mem::{zeroed, replace, swap};
155155
use core::ptr;
156156

157-
use {Collection, Mutable};
157+
use {Collection, Mutable, MutableSeq};
158158
use slice;
159159
use vec::Vec;
160160

@@ -388,6 +388,7 @@ mod tests {
388388

389389
use priority_queue::PriorityQueue;
390390
use vec::Vec;
391+
use MutableSeq;
391392

392393
#[test]
393394
fn test_iterator() {

branches/try/src/libcollections/ringbuf.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use core::default::Default;
2020
use core::fmt;
2121
use core::iter::RandomAccessIterator;
2222

23-
use {Deque, Collection, Mutable};
23+
use {Deque, Collection, Mutable, MutableSeq};
2424
use vec::Vec;
2525

2626
static INITIAL_CAPACITY: uint = 8u; // 2^3
@@ -114,6 +114,11 @@ impl<T> Deque<T> for RingBuf<T> {
114114
}
115115
}
116116

117+
impl<T> MutableSeq<T> for RingBuf<T> {
118+
fn push(&mut self, t: T) { self.push_back(t) }
119+
fn pop(&mut self) -> Option<T> { self.pop_back() }
120+
}
121+
117122
impl<T> Default for RingBuf<T> {
118123
#[inline]
119124
fn default() -> RingBuf<T> { RingBuf::new() }

branches/try/src/libcollections/slice.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ use core::mem;
107107
use core::ptr;
108108
use core::iter::{range_step, MultiplicativeIterator};
109109

110-
use Collection;
110+
use {Collection, MutableSeq};
111111
use vec::Vec;
112112

113113
pub use core::slice::{ref_slice, mut_ref_slice, Splits, Windows};
@@ -731,7 +731,7 @@ mod tests {
731731
use std::rt;
732732
use slice::*;
733733

734-
use Mutable;
734+
use {Mutable, MutableSeq};
735735
use vec::Vec;
736736

737737
fn square(n: uint) -> uint { n * n }
@@ -2133,6 +2133,7 @@ mod bench {
21332133
use test::Bencher;
21342134

21352135
use vec::Vec;
2136+
use MutableSeq;
21362137

21372138
#[bench]
21382139
fn iterator(b: &mut Bencher) {

branches/try/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ use core::cmp;
7777
use core::iter::AdditiveIterator;
7878
use core::mem;
7979

80-
use Collection;
80+
use {Collection, MutableSeq};
8181
use hash;
8282
use string::String;
8383
use unicode;

branches/try/src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use core::mem;
2020
use core::ptr;
2121
use core::raw::Slice;
2222

23-
use {Collection, Mutable};
23+
use {Collection, Mutable, MutableSeq};
2424
use hash;
2525
use str;
2626
use str::{CharRange, StrAllocating, MaybeOwned, Owned, Slice};

branches/try/src/libcollections/treemap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use core::mem::{replace, swap};
4040
use core::ptr;
4141
use std::hash::{Writer, Hash};
4242

43-
use {Collection, Mutable, Set, MutableSet, MutableMap, Map};
43+
use {Collection, Mutable, Set, MutableSet, MutableMap, Map, MutableSeq};
4444
use vec::Vec;
4545

4646
// This is implemented as an AA tree, which is a simplified variation of
@@ -1127,7 +1127,7 @@ mod test_treemap {
11271127
use std::rand::Rng;
11281128
use std::rand;
11291129

1130-
use {Map, MutableMap, Mutable};
1130+
use {Map, MutableMap, Mutable, MutableSeq};
11311131
use super::{TreeMap, TreeNode};
11321132

11331133
#[test]

0 commit comments

Comments
 (0)