Skip to content

Commit c1126ac

Browse files
committed
---
yaml --- r: 104553 b: refs/heads/try c: 6c41f99 h: refs/heads/master i: 104551: 2dd1539 v: v3
1 parent 4e21738 commit c1126ac

File tree

150 files changed

+1243
-2038
lines changed

Some content is hidden

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

150 files changed

+1243
-2038
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: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: 82747ed93e5af967b691653a56849da2c209d85d
5+
refs/heads/try: 6c41f993d390a0a8d9f42cfca4f365b6f93d0c26
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.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/try/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,6 @@ do
803803
make_dir $h/test/doc-guide-pointers
804804
make_dir $h/test/doc-guide-container
805805
make_dir $h/test/doc-guide-tasks
806-
make_dir $h/test/doc-guide-conditions
807806
make_dir $h/test/doc-complement-cheatsheet
808807
make_dir $h/test/doc-rust
809808
done

branches/try/mk/main.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,10 @@ endif
345345
ifdef CFG_DISABLE_RPATH
346346
ifeq ($$(OSTYPE_$(3)),apple-darwin)
347347
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
348-
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(HLIB$(1)_H_$(3))"
348+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
349349
else
350350
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
351-
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(HLIB$(1)_H_$(3))"
351+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
352352
endif
353353
else
354354
RPATH_VAR$(1)_T_$(2)_H_$(3) :=

branches/try/mk/tests.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,9 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3)
708708
ifeq ($(2),$$(CFG_BUILD))
709709
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
710710
@$$(call E, run doc-$(4) [$(2)])
711-
$$(Q)$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \
712-
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
711+
$$(Q)$$(RPATH_VAR$(1)_T_$(2)_H_$(3)) \
712+
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \
713+
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
713714
else
714715
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
715716
touch $$@
@@ -936,7 +937,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
936937
$(3)/test/run-make/$$* \
937938
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
938939
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
939-
"$$(TESTNAME)"
940+
"$$(TESTNAME)" \
941+
"$$(RPATH_VAR$(1)_T_$(2)_H_$(3))"
940942
@touch $$@
941943
else
942944
# FIXME #11094 - The above rule doesn't work right for multiple targets

branches/try/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/try/src/compiletest/procsrv.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,26 @@ fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
3535
#[cfg(target_os = "linux")]
3636
#[cfg(target_os = "macos")]
3737
#[cfg(target_os = "freebsd")]
38-
fn target_env(_lib_path: &str, _prog: &str) -> ~[(~str,~str)] {
39-
os::env()
38+
fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
39+
// Make sure we include the aux directory in the path
40+
let aux_path = prog + ".libaux";
41+
42+
let mut env = os::env();
43+
let var = if cfg!(target_os = "macos") {
44+
"DYLD_LIBRARY_PATH"
45+
} else {
46+
"LD_LIBRARY_PATH"
47+
};
48+
let prev = match env.iter().position(|&(ref k, _)| k.as_slice() == var) {
49+
Some(i) => env.remove(i).unwrap().val1(),
50+
None => ~"",
51+
};
52+
env.push((var.to_owned(), if prev.is_empty() {
53+
lib_path + ":" + aux_path
54+
} else {
55+
lib_path + ":" + aux_path + ":" + prev
56+
}));
57+
return env;
4058
}
4159

4260
pub struct Result {status: ProcessExit, out: ~str, err: ~str}

branches/try/src/doc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ li {list-style-type: none; }
1919
* [Foreign Function Interface](guide-ffi.html)
2020
* [Macros](guide-macros.html)
2121
* [Testing](guide-testing.html)
22-
* [Conditions](guide-conditions.html)
2322
* [Rust's Runtime](guide-runtime.html)
2423

2524
# Libraries
@@ -43,6 +42,7 @@ li {list-style-type: none; }
4342
* [The `sync` library for concurrency-enabled mechanisms and primitives](sync/index.html)
4443
* [The `syntax` library, the Rust parser](syntax/index.html)
4544
* [The `term` terminal-handling library](term/index.html)
45+
* [The `test` library](test/index.html)
4646
* [The `uuid` 128-bit universally unique identifier library](uuid/index.html)
4747

4848
# Tooling

branches/try/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/try/src/etc/maketest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
os.putenv('CC', sys.argv[4])
1818
os.putenv('RUSTDOC', os.path.abspath(sys.argv[5]))
1919
filt = sys.argv[6]
20+
ldpath = sys.argv[7]
21+
if ldpath != '':
22+
os.putenv(ldpath.split('=')[0], ldpath.split('=')[1])
2023

2124
if not filt in sys.argv[1]:
2225
sys.exit(0)

branches/try/src/libcollections/hashmap.rs

Lines changed: 2 additions & 1 deletion
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};
@@ -97,7 +98,7 @@ fn resize_at(capacity: uint) -> uint {
9798
(capacity * 3) / 4
9899
}
99100

100-
impl<K:Hash + Eq,V> HashMap<K, V> {
101+
impl<K:Hash + Eq, V> HashMap<K, V> {
101102
#[inline]
102103
fn to_bucket(&self, h: uint) -> uint {
103104
// A good hash function with entropy spread over all of the

branches/try/src/libextra/url.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use std::cmp::Eq;
1616
use std::fmt;
1717
use std::hash::{Hash, sip};
1818
use std::io::BufReader;
19+
use std::from_str::FromStr;
1920
use std::uint;
2021

2122
use collections::HashMap;

branches/try/src/libgreen/sched.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,8 +1394,6 @@ mod test {
13941394
});
13951395
}
13961396

1397-
// FIXME: #9407: ignore-test
1398-
#[ignore]
13991397
#[test]
14001398
fn dont_starve_1() {
14011399
let mut pool = SchedPool::new(PoolConfig {

branches/try/src/libgreen/stack.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl StackPool {
139139
pub fn take_stack(&mut self, min_size: uint) -> Stack {
140140
// Ideally this would be a binary search
141141
match self.stacks.iter().position(|s| min_size <= s.min_size) {
142-
Some(idx) => self.stacks.swap_remove(idx),
142+
Some(idx) => self.stacks.swap_remove(idx).unwrap(),
143143
None => Stack::new(min_size)
144144
}
145145
}

branches/try/src/libnum/bigint.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use Integer;
2020

2121
use std::cmp;
2222
use std::fmt;
23+
use std::from_str::FromStr;
2324
use std::num::{Bitwise, ToPrimitive, FromPrimitive};
2425
use std::num::{Zero, One, ToStrRadix, FromStrRadix};
2526
use std::rand::Rng;
@@ -1397,8 +1398,9 @@ mod biguint_tests {
13971398
use super::{Plus, BigInt, RandBigInt, ToBigInt};
13981399
13991400
use std::cmp::{Less, Equal, Greater};
1401+
use std::from_str::FromStr;
14001402
use std::i64;
1401-
use std::num::{Zero, One, FromStrRadix};
1403+
use std::num::{Zero, One, FromStrRadix, ToStrRadix};
14021404
use std::num::{ToPrimitive, FromPrimitive};
14031405
use std::rand::{task_rng};
14041406
use std::str;
@@ -2056,7 +2058,7 @@ mod bigint_tests {
20562058

20572059
use std::cmp::{Less, Equal, Greater};
20582060
use std::i64;
2059-
use std::num::{Zero, One, FromStrRadix};
2061+
use std::num::{Zero, One, FromStrRadix, ToStrRadix};
20602062
use std::num::{ToPrimitive, FromPrimitive};
20612063
use std::rand::{task_rng};
20622064
use std::u64;

branches/try/src/libnum/rational.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ impl<T: FromStrRadix + Clone + Integer + Ord>
333333
mod test {
334334

335335
use super::{Ratio, Rational, BigRational};
336-
use std::num::{Zero,One,FromStrRadix,FromPrimitive};
336+
use std::num::{Zero, One, FromStrRadix, FromPrimitive, ToStrRadix};
337337
use std::from_str::FromStr;
338338

339339
pub static _0 : Rational = Ratio { numer: 0, denom: 1};

branches/try/src/librustc/back/archive.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ impl Archive {
145145
/// Lists all files in an archive
146146
pub fn files(&self) -> ~[~str] {
147147
let output = run_ar(self.sess, "t", None, [&self.dst]);
148-
str::from_utf8(output.output).unwrap().lines().map(|s| s.to_owned()).collect()
148+
let output = str::from_utf8(output.output).unwrap();
149+
// use lines_any because windows delimits output with `\r\n` instead of
150+
// just `\n`
151+
output.lines_any().map(|s| s.to_owned()).collect()
149152
}
150153

151154
fn add_archive(&mut self, archive: &Path, name: &str,

branches/try/src/librustc/driver/driver.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ pub fn phase_3_run_analysis_passes(sess: Session,
295295
let region_map = time(time_passes, "region resolution", (), |_|
296296
middle::region::resolve_crate(sess, krate));
297297

298-
let ty_cx = ty::mk_ctxt(sess, def_map, named_region_map, ast_map, freevars,
299-
region_map, lang_items);
298+
let ty_cx = ty::mk_ctxt(sess, def_map, named_region_map, ast_map,
299+
freevars, region_map, lang_items);
300300

301301
// passes are timed inside typeck
302302
let (method_map, vtable_map) = typeck::check_crate(ty_cx, trait_map, krate);
@@ -975,6 +975,7 @@ pub fn build_session_(sopts: @session::Options,
975975
lints: RefCell::new(HashMap::new()),
976976
node_id: Cell::new(1),
977977
crate_types: @RefCell::new(~[]),
978+
features: front::feature_gate::Features::new()
978979
}
979980
}
980981

branches/try/src/librustc/driver/session.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use back::target_strs;
1313
use back;
1414
use driver::driver::host_triple;
15+
use front;
1516
use metadata::filesearch;
1617
use metadata;
1718
use middle::lint;
@@ -186,6 +187,7 @@ pub struct Session_ {
186187
~[(lint::Lint, codemap::Span, ~str)]>>,
187188
node_id: Cell<ast::NodeId>,
188189
crate_types: @RefCell<~[CrateType]>,
190+
features: front::feature_gate::Features
189191
}
190192

191193
pub type Session = @Session_;

branches/try/src/librustc/front/feature_gate.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ use syntax::parse::token;
3030

3131
use driver::session::Session;
3232

33+
use std::cell::Cell;
34+
3335
/// This is a list of all known features since the beginning of time. This list
3436
/// can never shrink, it may only be expanded (in order to prevent old programs
3537
/// from failing to compile). The status of each feature may change, however.
@@ -69,6 +71,19 @@ enum Status {
6971
Accepted,
7072
}
7173

74+
/// A set of features to be used by later passes.
75+
pub struct Features {
76+
default_type_params: Cell<bool>
77+
}
78+
79+
impl Features {
80+
pub fn new() -> Features {
81+
Features {
82+
default_type_params: Cell::new(false)
83+
}
84+
}
85+
}
86+
7287
struct Context {
7388
features: ~[&'static str],
7489
sess: Session,
@@ -315,4 +330,6 @@ pub fn check_crate(sess: Session, krate: &ast::Crate) {
315330
visit::walk_crate(&mut cx, krate, ());
316331

317332
sess.abort_if_errors();
333+
334+
sess.features.default_type_params.set(cx.has_feature("default_type_params"));
318335
}

branches/try/src/librustc/metadata/loader.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ pub struct ArchiveMetadata {
6767
priv data: &'static [u8],
6868
}
6969

70+
// FIXME(#11857) this should be a "real" realpath
71+
fn realpath(p: &Path) -> Path {
72+
use std::os;
73+
use std::io::fs;
74+
75+
let path = os::make_absolute(p);
76+
match fs::readlink(&path) {
77+
Ok(p) => p,
78+
Err(..) => path
79+
}
80+
}
81+
7082
impl Context {
7183
pub fn load_library_crate(&self, root_ident: Option<~str>) -> Library {
7284
match self.find_library_crate() {
@@ -121,7 +133,7 @@ impl Context {
121133
(HashSet::new(), HashSet::new())
122134
});
123135
let (ref mut rlibs, _) = *slot;
124-
rlibs.insert(path.clone());
136+
rlibs.insert(realpath(path));
125137
FileMatches
126138
}
127139
None => {
@@ -138,7 +150,7 @@ impl Context {
138150
(HashSet::new(), HashSet::new())
139151
});
140152
let (_, ref mut dylibs) = *slot;
141-
dylibs.insert(path.clone());
153+
dylibs.insert(realpath(path));
142154
FileMatches
143155
}
144156
None => {

0 commit comments

Comments
 (0)