Skip to content

Commit a7c7536

Browse files
committed
---
yaml --- r: 149549 b: refs/heads/try2 c: d222f03 h: refs/heads/master i: 149547: c129bf4 v: v3
1 parent e04f09f commit a7c7536

Some content is hidden

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

99 files changed

+929
-765
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 3e531ed0edd44c5af714fdeaa0cddb9d5c8154a2
8+
refs/heads/try2: d222f03f42fe855d2fadc87010453bcfc2a669e1
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,13 @@ before_script:
3939
# manually disables bringing in these two libraries, but the stock LLVM was
4040
# apparently built with these options. We provide these options when building so
4141
# the `rustc` binary can successfully link.
42-
script:
43-
- make tidy
44-
- RUSTFLAGS="-C link-args='-lffi -lncurses'" make -j4 rustc-stage1
45-
- make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail
42+
#
43+
# As a result of https://github.com/travis-ci/travis-ci/issues/1066, we run
44+
# everything in one large command instead of multiple commands.
45+
script: |
46+
make tidy &&
47+
RUSTFLAGS="-C link-args='-lffi -lncurses'" make -j4 rustc-stage1 &&
48+
make check-stage1-std check-stage1-rpass check-stage1-cfail check-stage1-rfail
4649
4750
env:
4851
- NO_BENCH=1

branches/try2/mk/crates.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
6565
collections time extra
6666
DEPS_rustdoc := rustc native:sundown serialize sync getopts collections \
6767
test time
68-
DEPS_flate := std native:miniz
68+
DEPS_flate := std extra native:miniz
6969
DEPS_arena := std collections
7070
DEPS_glob := std
71-
DEPS_serialize := std
71+
DEPS_serialize := std collections
7272
DEPS_term := std collections
7373
DEPS_semver := std
7474
DEPS_uuid := std serialize
7575
DEPS_sync := std
7676
DEPS_getopts := std
77-
DEPS_collections := std serialize
77+
DEPS_collections := std
7878
DEPS_fourcc := syntax std
79-
DEPS_num := std extra
79+
DEPS_num := std
8080
DEPS_test := std extra collections getopts serialize term
8181
DEPS_time := std serialize
8282

branches/try2/mk/tests.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ endif
171171
# Main test targets
172172
######################################################################
173173

174-
check: cleantestlibs cleantmptestlogs tidy all check-stage2
174+
check: cleantmptestlogs cleantestlibs tidy check-notidy
175+
176+
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
175177
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
176178

177179
check-lite: cleantestlibs cleantmptestlogs \

branches/try2/src/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ Source layout:
1010
| `libgreen/` | The M:N runtime library |
1111
| `libnative/` | The 1:1 runtime library |
1212
| `libsyntax/` | The Rust parser and pretty-printer |
13+
| `libcollections/` | A collection of useful data structures and containers |
14+
| `libnum/` | Extended number support library (complex, rational, etc) |
15+
| `libtest/` | Rust's test-runner code |
16+
| ------------------- | --------------------------------------------------------- |
17+
| `libarena/` | The arena (a fast but limited) memory allocator |
18+
| `libflate/` | Simple compression library |
19+
| `libfourcc/` | Data format identifier library |
20+
| `libgetopts/` | Get command-line-options library |
21+
| `libglob/` | Unix glob patterns library |
22+
| `libsemver/` | Rust's semantic versioning library |
23+
| `libserialize/` | Encode-Decode types library |
24+
| `libsync/` | Concurrency mechanisms and primitives |
25+
| `libterm/` | ANSI color library for terminals |
26+
| `libtime/` | Time operations library |
27+
| `libuuid/` | UUID's handling code |
1328
| ------------------- | --------------------------------------------------------- |
1429
| `rt/` | The runtime system |
1530
| `rt/rust_*.c` | - Some of the runtime services |
@@ -31,8 +46,13 @@ Source layout:
3146
| ------------------- | --------------------------------------------------------- |
3247
| `librustdoc/` | The Rust API documentation tool |
3348
| `libuv/` | The libuv submodule |
49+
| `librustuv/` | Rust libuv support code |
3450
| ------------------- | --------------------------------------------------------- |
3551
| `llvm/` | The LLVM submodule |
3652
| `rustllvm/` | LLVM support code |
3753
| ------------------- | --------------------------------------------------------- |
3854
| `etc/` | Scripts, editors support, misc |
55+
56+
57+
NOTE: This list (especially the second part of the table which contains modules and libraries)
58+
is highly volatile and subject to change.

branches/try2/src/doc/rust.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -875,16 +875,16 @@ An example of what will and will not work for `use` items:
875875

876876
~~~~
877877
# #[allow(unused_imports)];
878-
use foo::extra::json; // good: foo is at the root of the crate
878+
use foo::native::start; // good: foo is at the root of the crate
879879
use foo::baz::foobaz; // good: foo is at the root of the crate
880880
881881
mod foo {
882-
extern crate extra;
882+
extern crate native;
883883
884-
use foo::extra::json; // good: foo is at crate root
885-
// use extra::json::*; // bad: extra is not at the crate root
886-
use self::baz::foobaz; // good: self refers to module 'foo'
887-
use foo::bar::foobar; // good: foo is at crate root
884+
use foo::native::start; // good: foo is at crate root
885+
// use native::start; // bad: native is not at the crate root
886+
use self::baz::foobaz; // good: self refers to module 'foo'
887+
use foo::bar::foobar; // good: foo is at crate root
888888
889889
pub mod bar {
890890
pub fn foobar() { }

branches/try2/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,8 +1420,8 @@ bad, but often copies are expensive. So we’d like to define a function
14201420
that takes the points by pointer. We can use references to do this:
14211421
14221422
~~~
1423+
use std::num::sqrt;
14231424
# struct Point { x: f64, y: f64 }
1424-
# fn sqrt(f: f64) -> f64 { 0.0 }
14251425
fn compute_distance(p1: &Point, p2: &Point) -> f64 {
14261426
let x_d = p1.x - p2.x;
14271427
let y_d = p1.y - p2.y;

branches/try2/src/libarena/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,12 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
167167
// is necessary in order to properly do cleanup if a failure occurs
168168
// during an initializer.
169169
#[inline]
170-
unsafe fn bitpack_tydesc_ptr(p: *TyDesc, is_done: bool) -> uint {
171-
let p_bits: uint = transmute(p);
172-
p_bits | (is_done as uint)
170+
fn bitpack_tydesc_ptr(p: *TyDesc, is_done: bool) -> uint {
171+
p as uint | (is_done as uint)
173172
}
174173
#[inline]
175-
unsafe fn un_bitpack_tydesc_ptr(p: uint) -> (*TyDesc, bool) {
176-
(transmute(p & !1), p & 1 == 1)
174+
fn un_bitpack_tydesc_ptr(p: uint) -> (*TyDesc, bool) {
175+
((p & !1) as *TyDesc, p & 1 == 1)
177176
}
178177

179178
impl Arena {

branches/try2/src/libcollections/dlist.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ use std::iter;
3030

3131
use deque::Deque;
3232

33-
use serialize::{Encodable, Decodable, Encoder, Decoder};
34-
3533
/// A doubly-linked list.
3634
pub struct DList<T> {
3735
priv length: uint,
@@ -630,31 +628,6 @@ impl<A: Clone> Clone for DList<A> {
630628
}
631629
}
632630

633-
impl<
634-
S: Encoder,
635-
T: Encodable<S>
636-
> Encodable<S> for DList<T> {
637-
fn encode(&self, s: &mut S) {
638-
s.emit_seq(self.len(), |s| {
639-
for (i, e) in self.iter().enumerate() {
640-
s.emit_seq_elt(i, |s| e.encode(s));
641-
}
642-
})
643-
}
644-
}
645-
646-
impl<D:Decoder,T:Decodable<D>> Decodable<D> for DList<T> {
647-
fn decode(d: &mut D) -> DList<T> {
648-
let mut list = DList::new();
649-
d.read_seq(|d, len| {
650-
for i in range(0u, len) {
651-
list.push_back(d.read_seq_elt(i, |d| Decodable::decode(d)));
652-
}
653-
});
654-
list
655-
}
656-
}
657-
658631
#[cfg(test)]
659632
mod tests {
660633
extern crate test;

branches/try2/src/libcollections/enum_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
use std::num::Bitwise;
1717

18-
#[deriving(Clone, Eq, Hash, Show, Encodable, Decodable)]
18+
#[deriving(Clone, Eq, Hash, Show)]
1919
/// A specialized Set implementation to use enum types.
2020
pub struct EnumSet<E> {
2121
// We must maintain the invariant that no bits are set

branches/try2/src/libcollections/hashmap.rs

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
//! ```
5454
5555
use std::cmp::max;
56+
use std::default::Default;
5657
use std::fmt;
5758
use std::hash::{Hash, Hasher, sip};
5859
use std::iter::{FilterMap, Chain, Repeat, Zip};
@@ -65,8 +66,6 @@ use std::vec::{Items, MutItems};
6566
use std::vec_ng::Vec;
6667
use std::vec_ng;
6768

68-
use serialize::{Encodable, Decodable, Encoder, Decoder};
69-
7069
static INITIAL_CAPACITY: uint = 32u; // 2^5
7170

7271
struct Bucket<K,V> {
@@ -912,71 +911,6 @@ pub type SetAlgebraItems<'a, T> =
912911
FilterMap<'static,(&'a HashSet<T>, &'a T), &'a T,
913912
Zip<Repeat<&'a HashSet<T>>,SetItems<'a,T>>>;
914913

915-
impl<
916-
E: Encoder,
917-
K: Encodable<E> + Hash + Eq,
918-
V: Encodable<E>
919-
> Encodable<E> for HashMap<K, V> {
920-
fn encode(&self, e: &mut E) {
921-
e.emit_map(self.len(), |e| {
922-
let mut i = 0;
923-
for (key, val) in self.iter() {
924-
e.emit_map_elt_key(i, |e| key.encode(e));
925-
e.emit_map_elt_val(i, |e| val.encode(e));
926-
i += 1;
927-
}
928-
})
929-
}
930-
}
931-
932-
impl<
933-
D: Decoder,
934-
K: Decodable<D> + Hash + Eq,
935-
V: Decodable<D>
936-
> Decodable<D> for HashMap<K, V> {
937-
fn decode(d: &mut D) -> HashMap<K, V> {
938-
d.read_map(|d, len| {
939-
let mut map = HashMap::with_capacity(len);
940-
for i in range(0u, len) {
941-
let key = d.read_map_elt_key(i, |d| Decodable::decode(d));
942-
let val = d.read_map_elt_val(i, |d| Decodable::decode(d));
943-
map.insert(key, val);
944-
}
945-
map
946-
})
947-
}
948-
}
949-
950-
impl<
951-
S: Encoder,
952-
T: Encodable<S> + Hash + Eq
953-
> Encodable<S> for HashSet<T> {
954-
fn encode(&self, s: &mut S) {
955-
s.emit_seq(self.len(), |s| {
956-
let mut i = 0;
957-
for e in self.iter() {
958-
s.emit_seq_elt(i, |s| e.encode(s));
959-
i += 1;
960-
}
961-
})
962-
}
963-
}
964-
965-
impl<
966-
D: Decoder,
967-
T: Decodable<D> + Hash + Eq
968-
> Decodable<D> for HashSet<T> {
969-
fn decode(d: &mut D) -> HashSet<T> {
970-
d.read_seq(|d, len| {
971-
let mut set = HashSet::with_capacity(len);
972-
for i in range(0u, len) {
973-
set.insert(d.read_seq_elt(i, |d| Decodable::decode(d)));
974-
}
975-
set
976-
})
977-
}
978-
}
979-
980914
#[cfg(test)]
981915
mod test_map {
982916
use super::{HashMap, HashSet};

branches/try2/src/libcollections/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#[feature(macro_rules, managed_boxes)];
2121

22-
extern crate serialize;
2322
#[cfg(test)] extern crate test;
2423

2524
pub use bitv::Bitv;

branches/try2/src/libcollections/ringbuf.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use std::iter::{Rev, RandomAccessIterator};
1919

2020
use deque::Deque;
2121

22-
use serialize::{Encodable, Decodable, Encoder, Decoder};
23-
2422
static INITIAL_CAPACITY: uint = 8u; // 2^3
2523
static MINIMUM_CAPACITY: uint = 2u;
2624

@@ -404,31 +402,6 @@ impl<A> Extendable<A> for RingBuf<A> {
404402
}
405403
}
406404

407-
impl<
408-
S: Encoder,
409-
T: Encodable<S>
410-
> Encodable<S> for RingBuf<T> {
411-
fn encode(&self, s: &mut S) {
412-
s.emit_seq(self.len(), |s| {
413-
for (i, e) in self.iter().enumerate() {
414-
s.emit_seq_elt(i, |s| e.encode(s));
415-
}
416-
})
417-
}
418-
}
419-
420-
impl<D:Decoder,T:Decodable<D>> Decodable<D> for RingBuf<T> {
421-
fn decode(d: &mut D) -> RingBuf<T> {
422-
let mut deque = RingBuf::new();
423-
d.read_seq(|d, len| {
424-
for i in range(0u, len) {
425-
deque.push_back(d.read_seq_elt(i, |d| Decodable::decode(d)));
426-
}
427-
});
428-
deque
429-
}
430-
}
431-
432405
#[cfg(test)]
433406
mod tests {
434407
extern crate test;

0 commit comments

Comments
 (0)