Skip to content

Commit 06cb6f8

Browse files
committed
---
yaml --- r: 104560 b: refs/heads/try c: 5737d1f h: refs/heads/master v: v3
1 parent 006e0db commit 06cb6f8

File tree

288 files changed

+3387
-4689
lines changed

Some content is hidden

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

288 files changed

+3387
-4689
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: 90f2d1d947b5882986e3c2c9e3cda2e959adea0d
5+
refs/heads/try: 5737d1f70459d03b219c8dadb8ac71c26e7e49d8
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/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/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: 8 additions & 4 deletions
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 \
@@ -706,8 +708,9 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3)
706708
ifeq ($(2),$$(CFG_BUILD))
707709
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
708710
@$$(call E, run doc-$(4) [$(2)])
709-
$$(Q)$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \
710-
$$(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 $$@
711714
else
712715
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
713716
touch $$@
@@ -934,7 +937,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
934937
$(3)/test/run-make/$$* \
935938
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
936939
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
937-
"$$(TESTNAME)"
940+
"$$(TESTNAME)" \
941+
"$$(RPATH_VAR$(1)_T_$(2)_H_$(3))"
938942
@touch $$@
939943
else
940944
# 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: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
// except according to those terms.
1010

1111
use std::os;
12-
use std::run;
1312
use std::str;
14-
use std::io::process::ProcessExit;
13+
use std::io::process::{ProcessExit, Process, ProcessConfig, ProcessOutput};
1514

1615
#[cfg(target_os = "win32")]
1716
fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
@@ -36,8 +35,26 @@ fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {
3635
#[cfg(target_os = "linux")]
3736
#[cfg(target_os = "macos")]
3837
#[cfg(target_os = "freebsd")]
39-
fn target_env(_lib_path: &str, _prog: &str) -> ~[(~str,~str)] {
40-
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;
4158
}
4259

4360
pub struct Result {status: ProcessExit, out: ~str, err: ~str}
@@ -49,17 +66,19 @@ pub fn run(lib_path: &str,
4966
input: Option<~str>) -> Option<Result> {
5067

5168
let env = env + target_env(lib_path, prog);
52-
let mut opt_process = run::Process::new(prog, args, run::ProcessOptions {
53-
env: Some(env),
54-
.. run::ProcessOptions::new()
69+
let mut opt_process = Process::configure(ProcessConfig {
70+
program: prog,
71+
args: args,
72+
env: Some(env.as_slice()),
73+
.. ProcessConfig::new()
5574
});
5675

5776
match opt_process {
5877
Ok(ref mut process) => {
5978
for input in input.iter() {
60-
process.input().write(input.as_bytes()).unwrap();
79+
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
6180
}
62-
let run::ProcessOutput { status, output, error } = process.finish_with_output();
81+
let ProcessOutput { status, output, error } = process.wait_with_output();
6382

6483
Some(Result {
6584
status: status,
@@ -75,18 +94,20 @@ pub fn run_background(lib_path: &str,
7594
prog: &str,
7695
args: &[~str],
7796
env: ~[(~str, ~str)],
78-
input: Option<~str>) -> Option<run::Process> {
97+
input: Option<~str>) -> Option<Process> {
7998

8099
let env = env + target_env(lib_path, prog);
81-
let opt_process = run::Process::new(prog, args, run::ProcessOptions {
82-
env: Some(env),
83-
.. run::ProcessOptions::new()
100+
let opt_process = Process::configure(ProcessConfig {
101+
program: prog,
102+
args: args,
103+
env: Some(env.as_slice()),
104+
.. ProcessConfig::new()
84105
});
85106

86107
match opt_process {
87108
Ok(mut process) => {
88109
for input in input.iter() {
89-
process.input().write(input.as_bytes()).unwrap();
110+
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
90111
}
91112

92113
Some(process)

branches/try/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
360360
stdout: out,
361361
stderr: err,
362362
cmdline: cmdline};
363-
process.force_destroy().unwrap();
363+
process.signal_kill().unwrap();
364364
}
365365

366366
_=> {

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/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/try/src/doc/tutorial.md

Lines changed: 8 additions & 8 deletions
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;
@@ -1468,14 +1468,14 @@ For a more in-depth explanation of references and lifetimes, read the
14681468
14691469
## Freezing
14701470
1471-
Lending an immutable pointer to an object freezes it and prevents mutation.
1471+
Lending an &-pointer to an object freezes it and prevents mutation—even if the object was declared as `mut`.
14721472
`Freeze` objects have freezing enforced statically at compile-time. An example
14731473
of a non-`Freeze` type is [`RefCell<T>`][refcell].
14741474
14751475
~~~~
14761476
let mut x = 5;
14771477
{
1478-
let y = &x; // `x` is now frozen, it cannot be modified
1478+
let y = &x; // `x` is now frozen. It cannot be modified or re-assigned.
14791479
}
14801480
// `x` is now unfrozen again
14811481
# x = 3;
@@ -2021,8 +2021,8 @@ C++ templates.
20212021
20222022
## Traits
20232023
2024-
Within a generic function -- that is, a function parameterized by a
2025-
type parameter, say, `T` -- the operations we can do on arguments of
2024+
Within a generic functionthat is, a function parameterized by a
2025+
type parameter, say, `T`the operations we can do on arguments of
20262026
type `T` are quite limited. After all, since we don't know what type
20272027
`T` will be instantiated with, we can't safely modify or query values
20282028
of type `T`. This is where _traits_ come into play. Traits are Rust's
@@ -2519,7 +2519,7 @@ of type `ABC` can be randomly generated and converted to a string:
25192519
#[deriving(Eq)]
25202520
struct Circle { radius: f64 }
25212521
2522-
#[deriving(Rand, ToStr)]
2522+
#[deriving(Rand, Show)]
25232523
enum ABC { A, B, C }
25242524
~~~
25252525

@@ -2786,11 +2786,11 @@ src/animals.rs
27862786
27872787
src/mammals/humans.rs
27882788
src/mammals/humans/mod.rs
2789-
~~
2789+
~~~
27902790

27912791
If the animals file is `src/animals/mod.rs`, `rustc` will look for:
27922792

2793-
~~ {.notrust}
2793+
~~~ {.notrust}
27942794
src/animals/mod.rs
27952795
src/animals/fish.rs
27962796
src/animals/fish/mod.rs

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/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 {

0 commit comments

Comments
 (0)