Skip to content

Commit a0bfbeb

Browse files
committed
---
yaml --- r: 156411 b: refs/heads/snap-stage3 c: 41a7910 h: refs/heads/master i: 156409: 66128e5 156407: 904393c v: v3
1 parent e44c125 commit a0bfbeb

File tree

277 files changed

+1834
-3470
lines changed

Some content is hidden

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

277 files changed

+1834
-3470
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: c29a7520e7fb4a5b4d4eccfc594e05793ef6688d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 64716d529a9febcb035fabd444c32872aa55fafe
4+
refs/heads/snap-stage3: 41a79104a412989b802852f9ee6e589b06391d61
55
refs/heads/try: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/crates.mk

Lines changed: 4 additions & 5 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 debug rustrt \
54+
url log regex graphviz core rbml rlibc alloc rustrt \
5555
unicode
5656
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
5757
rustc_llvm rustc_back
@@ -63,20 +63,19 @@ DEPS_libc := core
6363
DEPS_rlibc := core
6464
DEPS_unicode := core
6565
DEPS_alloc := core libc native:jemalloc
66-
DEPS_debug := std
6766
DEPS_rustrt := alloc core libc collections native:rustrt_native
6867
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6968
native:rust_builtin native:backtrace
7069
DEPS_graphviz := std
7170
DEPS_green := std native:context_switch
7271
DEPS_native := std
73-
DEPS_syntax := std term serialize log fmt_macros debug arena libc
72+
DEPS_syntax := std term serialize log fmt_macros arena libc
7473
DEPS_rustc := syntax flate arena serialize getopts rbml \
75-
time log graphviz debug rustc_llvm rustc_back
74+
time log graphviz rustc_llvm rustc_back
7675
DEPS_rustc_llvm := native:rustllvm libc std
7776
DEPS_rustc_back := std syntax rustc_llvm flate log libc
7877
DEPS_rustdoc := rustc native:hoedown serialize getopts \
79-
test time debug
78+
test time
8079
DEPS_flate := std native:miniz
8180
DEPS_arena := std
8281
DEPS_graphviz := std

branches/snap-stage3/mk/install.mk

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

17-
install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
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
1824
$(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)"
19-
# Remove tmp files while we can because they may have been created under sudo
25+
# Remove tmp files because it's a decent amount of disk space
2026
$(Q)rm -R tmp/dist
2127

22-
uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
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
2337
$(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)"
24-
# Remove tmp files while we can because they may have been created under sudo
38+
# Remove tmp files because it's a decent amount of disk space
2539
$(Q)rm -R tmp/dist
2640

41+
prepare_uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
42+
43+
.PHONY: install prepare_install uninstall prepare_uninstall
44+
2745
tmp/empty_dir:
2846
mkdir -p $@
2947

branches/snap-stage3/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_lower().into_string();
34+
let kind = caps.name("kind").to_ascii().to_lowercase().into_string();
3535
let msg = caps.name("msg").trim().to_string();
3636

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

branches/snap-stage3/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` returns immediately a `future` object regardless of
216+
The call to `future::spawn` immediately returns 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 it's contents. Within the task's procedure, the captured
300+
the wrapper and not its 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 stack---running destructors and
327-
freeing memory along the way---and then exits. Unlike exceptions in C++,
326+
raises an exception, the task unwinds its stackrunning destructors and
327+
freeing memory along the wayand 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 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).
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).
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-
and its processing task can't proceed).
372+
such that the processing task cannot proceed).

branches/snap-stage3/src/doc/reference.md

Lines changed: 2 additions & 6 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+0072` (`r`), followed by `U+0062` (`b`), followed by zero or more
344+
character `U+0062` (`b`), followed by `U+0072` (`r`), 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`, `format!("{:?}", x)`)
1180+
* Reading data from private fields (`std::repr`)
11811181
* Leaks due to reference count cycles, even in the global heap
11821182
* Exiting without calling destructors
11831183
* Sending signals
@@ -2279,8 +2279,6 @@ 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___
22842282
* `owned_box`
22852283
: ___Needs filling in___
22862284
* `stack_exhausted`
@@ -2295,8 +2293,6 @@ These types help drive the compiler's analysis
22952293
: The type parameter should be considered invariant
22962294
* `ty_desc`
22972295
: ___Needs filling in___
2298-
* `ty_visitor`
2299-
: ___Needs filling in___
23002296

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

branches/snap-stage3/src/liballoc/arc.rs

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

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

324322
#[test]

branches/snap-stage3/src/liballoc/lib.rs

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

7878
// Allow testing this library
7979

80-
#[cfg(test)] extern crate debug;
8180
#[cfg(test)] extern crate native;
8281
#[cfg(test)] #[phase(plugin, link)] extern crate std;
8382
#[cfg(test)] #[phase(plugin, link)] extern crate log;

branches/snap-stage3/src/libcollections/bitv.rs

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

6664
use core::cmp;
@@ -1640,7 +1638,6 @@ mod tests {
16401638
use std::prelude::*;
16411639
use std::iter::range_step;
16421640
use std::u32;
1643-
use std::uint;
16441641
use std::rand;
16451642
use std::rand::Rng;
16461643
use test::Bencher;

branches/snap-stage3/src/libcollections/hash/sip.rs

Lines changed: 1 addition & 4 deletions
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,9 +412,6 @@ 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-
418415
assert_eq!(f, i);
419416
assert_eq!(f, v);
420417

branches/snap-stage3/src/libcollections/lib.rs

Lines changed: 1 addition & 2 deletions
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,7 +33,6 @@ extern crate alloc;
3333

3434
#[cfg(test)] extern crate native;
3535
#[cfg(test)] extern crate test;
36-
#[cfg(test)] extern crate debug;
3736

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

branches/snap-stage3/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/snap-stage3/src/libcore/intrinsics.rs

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

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

6364
// Name corresponding to the type
6465
pub name: &'static str,
6566
}
6667

68+
#[cfg(stage0)]
6769
#[lang="opaque"]
6870
pub enum Opaque { }
6971

72+
#[cfg(stage0)]
7073
pub type Disr = u64;
7174

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

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

0 commit comments

Comments
 (0)