Skip to content

Commit d57c8ec

Browse files
author
Jakub Wieczorek
committed
---
yaml --- r: 138327 b: refs/heads/auto c: f3d46bd h: refs/heads/master i: 138325: 2bfa4e1 138323: 6da5848 138319: 714cb5f v: v3
1 parent dfe9d4e commit d57c8ec

File tree

281 files changed

+3475
-1860
lines changed

Some content is hidden

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

281 files changed

+3475
-1860
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: c7c342d10c34e1ca1d809da42d7794db2d0860ad
16+
refs/heads/auto: f3d46bda657d71610b4db74792fe66d407176d46
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/crates.mk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
TARGET_CRATES := libc std green native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
url log regex graphviz core rbml rlibc alloc rustrt \
54+
url log regex graphviz core rbml rlibc alloc debug rustrt \
5555
unicode
5656
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
5757
rustc_llvm rustc_back
@@ -63,19 +63,20 @@ DEPS_libc := core
6363
DEPS_rlibc := core
6464
DEPS_unicode := core
6565
DEPS_alloc := core libc native:jemalloc
66+
DEPS_debug := std
6667
DEPS_rustrt := alloc core libc collections native:rustrt_native
6768
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6869
native:rust_builtin native:backtrace
6970
DEPS_graphviz := std
7071
DEPS_green := std native:context_switch
7172
DEPS_native := std
72-
DEPS_syntax := std term serialize log fmt_macros arena libc
73+
DEPS_syntax := std term serialize log fmt_macros debug arena libc
7374
DEPS_rustc := syntax flate arena serialize getopts rbml \
74-
time log graphviz rustc_llvm rustc_back
75+
time log graphviz debug rustc_llvm rustc_back
7576
DEPS_rustc_llvm := native:rustllvm libc std
7677
DEPS_rustc_back := std syntax rustc_llvm flate log libc
7778
DEPS_rustdoc := rustc native:hoedown serialize getopts \
78-
test time
79+
test time debug
7980
DEPS_flate := std native:miniz
8081
DEPS_arena := std
8182
DEPS_graphviz := std

branches/auto/mk/install.mk

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,16 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install:
18-
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
19-
# Build the dist as the original user
20-
$(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_install
21-
else
22-
$(Q)$(MAKE) prepare_install
23-
endif
17+
install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
2418
$(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)"
25-
# Remove tmp files because it's a decent amount of disk space
19+
# Remove tmp files while we can because they may have been created under sudo
2620
$(Q)rm -R tmp/dist
2721

28-
prepare_install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
29-
30-
uninstall:
31-
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
32-
# Build the dist as the original user
33-
$(Q)sudo -u "$$SUDO_USER" $(MAKE) prepare_uninstall
34-
else
35-
$(Q)$(MAKE) prepare_uninstall
36-
endif
22+
uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
3723
$(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)"
38-
# Remove tmp files because it's a decent amount of disk space
24+
# Remove tmp files while we can because they may have been created under sudo
3925
$(Q)rm -R tmp/dist
4026

41-
prepare_uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
42-
43-
.PHONY: install prepare_install uninstall prepare_uninstall
44-
4527
tmp/empty_dir:
4628
mkdir -p $@
4729

branches/auto/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
3131
fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
3232
re.captures(line).and_then(|caps| {
3333
let adjusts = caps.name("adjusts").len();
34-
let kind = caps.name("kind").to_ascii().to_lowercase().into_string();
34+
let kind = caps.name("kind").to_ascii().to_lower().into_string();
3535
let msg = caps.name("msg").trim().to_string();
3636

3737
debug!("line={} kind={} msg={}", line_num, kind, msg);

branches/auto/src/doc/guide-tasks.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ concurrency: particularly, ownership. The language leaves the implementation
4141
details to the standard library.
4242

4343
The `spawn` function has a very simple type signature: `fn spawn(f: proc():
44-
Send)`. Because it accepts only procs, and procs contain only owned data,
44+
Send)`. Because it accepts only procs, and procs contain only owned data,
4545
`spawn` can safely move the entire proc and all its associated state into an
4646
entirely different task for execution. Like any closure, the function passed to
4747
`spawn` may capture an environment that it carries across tasks.
@@ -213,7 +213,7 @@ println!("fib(50) = {}", delayed_fib.get())
213213
# }
214214
```
215215

216-
The call to `future::spawn` immediately returns a `future` object regardless of
216+
The call to `future::spawn` returns immediately a `future` object regardless of
217217
how long it takes to run `fib(50)`. You can then make yourself a sandwich while
218218
the computation of `fib` is running. The result of the execution of the method
219219
is obtained by calling `get` on the future. This call will block until the
@@ -297,7 +297,7 @@ let numbers_arc = Arc::new(numbers);
297297
```
298298

299299
and a clone is captured for each task via a procedure. This only copies
300-
the wrapper and not its contents. Within the task's procedure, the captured
300+
the wrapper and not it's contents. Within the task's procedure, the captured
301301
Arc reference can be used as a shared reference to the underlying vector as
302302
if it were local.
303303

@@ -323,20 +323,20 @@ Rust has a built-in mechanism for raising exceptions. The `fail!()` macro
323323
(which can also be written with an error string as an argument: `fail!(
324324
~reason)`) and the `assert!` construct (which effectively calls `fail!()` if a
325325
boolean expression is false) are both ways to raise exceptions. When a task
326-
raises an exception, the task unwinds its stackrunning destructors and
327-
freeing memory along the wayand then exits. Unlike exceptions in C++,
326+
raises an exception the task unwinds its stack---running destructors and
327+
freeing memory along the way---and then exits. Unlike exceptions in C++,
328328
exceptions in Rust are unrecoverable within a single task: once a task fails,
329329
there is no way to "catch" the exception.
330330

331331
While it isn't possible for a task to recover from failure, tasks may notify
332332
each other of failure. The simplest way of handling task failure is with the
333-
`try` function, which is similar to `spawn`, but immediately blocks and waits
334-
for the child task to finish. `try` returns a value of type
335-
`Result<T, Box<Any + Send>>`. `Result` is an `enum` type with two variants:
336-
`Ok` and `Err`. In this case, because the type arguments to `Result` are `int`
337-
and `()`, callers can pattern-match on a result to check whether it's an `Ok`
338-
result with an `int` field (representing a successful result) or an `Err` result
339-
(representing termination with an error).
333+
`try` function, which is similar to `spawn`, but immediately blocks waiting for
334+
the child task to finish. `try` returns a value of type `Result<T, Box<Any +
335+
Send>>`. `Result` is an `enum` type with two variants: `Ok` and `Err`. In this
336+
case, because the type arguments to `Result` are `int` and `()`, callers can
337+
pattern-match on a result to check whether it's an `Ok` result with an `int`
338+
field (representing a successful result) or an `Err` result (representing
339+
termination with an error).
340340

341341
```{rust}
342342
# use std::task;
@@ -369,4 +369,4 @@ the entire program (perhaps you're writing an assert which, if it trips,
369369
indicates an unrecoverable logic error); in other cases you might want to
370370
contain the failure at a certain boundary (perhaps a small piece of input from
371371
the outside world, which you happen to be processing in parallel, is malformed
372-
such that the processing task cannot proceed).
372+
and its processing task can't proceed).

branches/auto/src/doc/reference.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ following forms:
341341
escaped in order to denote its ASCII encoding `0x5C`.
342342

343343
Raw byte string literals do not process any escapes. They start with the
344-
character `U+0062` (`b`), followed by `U+0072` (`r`), followed by zero or more
344+
character `U+0072` (`r`), followed by `U+0062` (`b`), followed by zero or more
345345
of the character `U+0023` (`#`), and a `U+0022` (double-quote) character. The
346346
_raw string body_ is not defined in the EBNF grammar above: it can contain any
347347
sequence of ASCII characters and is terminated only by another `U+0022`
@@ -1177,7 +1177,7 @@ This is a list of behaviour not considered *unsafe* in Rust terms, but that may
11771177
be undesired.
11781178

11791179
* Deadlocks
1180-
* Reading data from private fields (`std::repr`)
1180+
* Reading data from private fields (`std::repr`, `format!("{:?}", x)`)
11811181
* Leaks due to reference count cycles, even in the global heap
11821182
* Exiting without calling destructors
11831183
* Sending signals
@@ -2279,6 +2279,8 @@ These types help drive the compiler's analysis
22792279
: The lifetime parameter should be considered invariant
22802280
* `malloc`
22812281
: Allocate memory on the managed heap.
2282+
* `opaque`
2283+
: ___Needs filling in___
22822284
* `owned_box`
22832285
: ___Needs filling in___
22842286
* `stack_exhausted`
@@ -2293,6 +2295,8 @@ These types help drive the compiler's analysis
22932295
: The type parameter should be considered invariant
22942296
* `ty_desc`
22952297
: ___Needs filling in___
2298+
* `ty_visitor`
2299+
: ___Needs filling in___
22962300

22972301
> **Note:** This list is likely to become out of date. We should auto-generate
22982302
> it from `librustc/middle/lang_items.rs`.

branches/auto/src/liballoc/arc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ mod tests {
317317

318318
assert_eq!((*arc_v)[2], 3);
319319
assert_eq!((*arc_v)[4], 5);
320+
321+
info!("{:?}", arc_v);
320322
}
321323

322324
#[test]

branches/auto/src/liballoc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ extern crate libc;
7777

7878
// Allow testing this library
7979

80+
#[cfg(test)] extern crate debug;
8081
#[cfg(test)] extern crate native;
8182
#[cfg(test)] #[phase(plugin, link)] extern crate std;
8283
#[cfg(test)] #[phase(plugin, link)] extern crate log;

branches/auto/src/libcollections/bitv.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
//! println!("There are {} primes below {}", num_primes, max_prime);
6060
//! ```
6161
62+
#![allow(missing_doc)]
63+
6264
use core::prelude::*;
6365

6466
use core::cmp;
@@ -1638,6 +1640,7 @@ mod tests {
16381640
use std::prelude::*;
16391641
use std::iter::range_step;
16401642
use std::u32;
1643+
use std::uint;
16411644
use std::rand;
16421645
use std::rand::Rng;
16431646
use test::Bencher;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ mod tests {
402402
debug!("siphash test {}: {}", t, buf);
403403
let vec = u8to64_le!(vecs[t], 0);
404404
let out = hash_with_keys(k0, k1, &Bytes(buf.as_slice()));
405-
debug!("got {}, expected {}", out, vec);
405+
debug!("got {:?}, expected {:?}", out, vec);
406406
assert_eq!(vec, out);
407407

408408
state_full.reset();
@@ -412,6 +412,9 @@ mod tests {
412412
let v = to_hex_str(&vecs[t]);
413413
debug!("{}: ({}) => inc={} full={}", t, v, i, f);
414414

415+
debug!("full state {:?}", state_full);
416+
debug!("inc state {:?}", state_inc);
417+
415418
assert_eq!(f, i);
416419
assert_eq!(f, v);
417420

branches/auto/src/libcollections/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Collection types.
1212
//!
13-
//! See [std::collections](../std/collections) for a detailed discussion of collections in Rust.
13+
//! See [../std/collections](std::collections) for a detailed discussion of collections in Rust.
1414
1515

1616
#![crate_name = "collections"]
@@ -33,6 +33,7 @@ extern crate alloc;
3333

3434
#[cfg(test)] extern crate native;
3535
#[cfg(test)] extern crate test;
36+
#[cfg(test)] extern crate debug;
3637

3738
#[cfg(test)] #[phase(plugin, link)] extern crate std;
3839
#[cfg(test)] #[phase(plugin, link)] extern crate log;

branches/auto/src/libcollections/ringbuf.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -551,21 +551,21 @@ mod tests {
551551
assert_eq!(d.len(), 3u);
552552
d.push(137);
553553
assert_eq!(d.len(), 4u);
554-
debug!("{}", d.front());
554+
debug!("{:?}", d.front());
555555
assert_eq!(*d.front().unwrap(), 42);
556-
debug!("{}", d.back());
556+
debug!("{:?}", d.back());
557557
assert_eq!(*d.back().unwrap(), 137);
558558
let mut i = d.pop_front();
559-
debug!("{}", i);
559+
debug!("{:?}", i);
560560
assert_eq!(i, Some(42));
561561
i = d.pop();
562-
debug!("{}", i);
562+
debug!("{:?}", i);
563563
assert_eq!(i, Some(137));
564564
i = d.pop();
565-
debug!("{}", i);
565+
debug!("{:?}", i);
566566
assert_eq!(i, Some(137));
567567
i = d.pop();
568-
debug!("{}", i);
568+
debug!("{:?}", i);
569569
assert_eq!(i, Some(17));
570570
assert_eq!(d.len(), 0u);
571571
d.push(3);
@@ -576,10 +576,10 @@ mod tests {
576576
assert_eq!(d.len(), 3u);
577577
d.push_front(1);
578578
assert_eq!(d.len(), 4u);
579-
debug!("{}", d.get(0));
580-
debug!("{}", d.get(1));
581-
debug!("{}", d.get(2));
582-
debug!("{}", d.get(3));
579+
debug!("{:?}", d.get(0));
580+
debug!("{:?}", d.get(1));
581+
debug!("{:?}", d.get(2));
582+
debug!("{:?}", d.get(3));
583583
assert_eq!(*d.get(0), 1);
584584
assert_eq!(*d.get(1), 2);
585585
assert_eq!(*d.get(2), 3);

branches/auto/src/libcore/intrinsics.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,17 @@ pub struct TyDesc {
5858
pub drop_glue: GlueFn,
5959

6060
// Called by reflection visitor to visit a value of type `T`
61-
#[cfg(stage0)]
6261
pub visit_glue: GlueFn,
6362

6463
// Name corresponding to the type
6564
pub name: &'static str,
6665
}
6766

68-
#[cfg(stage0)]
6967
#[lang="opaque"]
7068
pub enum Opaque { }
7169

72-
#[cfg(stage0)]
7370
pub type Disr = u64;
7471

75-
#[cfg(stage0)]
7672
#[lang="ty_visitor"]
7773
pub trait TyVisitor {
7874
fn visit_bot(&mut self) -> bool;
@@ -331,6 +327,8 @@ extern "rust-intrinsic" {
331327
/// Returns `true` if a type is managed (will be allocated on the local heap)
332328
pub fn owns_managed<T>() -> bool;
333329

330+
pub fn visit_tydesc(td: *const TyDesc, tv: &mut TyVisitor);
331+
334332
/// Calculates the offset from a pointer. The offset *must* be in-bounds of
335333
/// the object, or one-byte-past-the-end. An arithmetic overflow is also
336334
/// undefined behaviour.

0 commit comments

Comments
 (0)