Skip to content

Commit 0a9f00b

Browse files
committed
---
yaml --- r: 120735 b: refs/heads/dist-snap c: 2a63e44 h: refs/heads/master i: 120733: 94788b9 120731: 62bda5b 120727: ba9fe52 120719: d73c519 120703: e3bc92e v: v3
1 parent d46a7dd commit 0a9f00b

File tree

172 files changed

+192
-1693
lines changed

Some content is hidden

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

172 files changed

+192
-1693
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: cd6fb59ee266d0eeb60a9bcfdd1c513a88a50c5c
9+
refs/heads/dist-snap: 2a63e44f120e5ef7d0d47758618dd520c3001078
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/configure

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ opt optimize 1 "build optimized rust code"
401401
opt optimize-cxx 1 "build optimized C++ code"
402402
opt optimize-llvm 1 "build optimized LLVM"
403403
opt optimize-tests 1 "build tests with optimizations"
404+
opt libcpp 1 "build with clang's libcpp"
404405
opt llvm-assertions 1 "build LLVM with assertions"
405406
opt debug 1 "build with extra debug fun"
406407
opt ratchet-bench 0 "ratchet benchmarks"
@@ -725,7 +726,6 @@ then
725726
if [ -z "$CC" ]
726727
then
727728
CFG_CC="clang"
728-
CFG_CXX="clang++"
729729
fi
730730
;;
731731
(*)
@@ -1048,15 +1048,13 @@ do
10481048

10491049
LLVM_CXX_64="ccache clang++ -Qunused-arguments"
10501050
LLVM_CC_64="ccache clang -Qunused-arguments"
1051-
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
10521051
;;
10531052
("clang")
10541053
LLVM_CXX_32="clang++ -m32 -Qunused-arguments"
10551054
LLVM_CC_32="clang -m32 -Qunused-arguments"
10561055

10571056
LLVM_CXX_64="clang++ -Qunused-arguments"
10581057
LLVM_CC_64="clang -Qunused-arguments"
1059-
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
10601058
;;
10611059
("ccache gcc")
10621060
LLVM_CXX_32="ccache g++ -m32"
@@ -1112,6 +1110,10 @@ do
11121110
CXXFLAGS=$LLVM_CXXFLAGS
11131111
LDFLAGS=$LLVM_LDFLAGS
11141112

1113+
if [ "$CFG_DISABLE_LIBCPP" != 1 ]; then
1114+
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
1115+
fi
1116+
11151117
LLVM_FLAGS="$LLVM_TARGETS $LLVM_OPTS $LLVM_BUILD \
11161118
$LLVM_HOST $LLVM_TARGET --with-python=$CFG_PYTHON"
11171119

branches/dist-snap/mk/crates.mk

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,24 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log regex graphviz core rlibc alloc debug
54+
workcache url log regex graphviz core rlibc alloc
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

5959
DEPS_core :=
6060
DEPS_rlibc :=
6161
DEPS_alloc := core libc native:jemalloc
62-
DEPS_debug := std
6362
DEPS_std := core libc alloc native:rustrt native:backtrace
6463
DEPS_graphviz := std
6564
DEPS_green := std rand native:context_switch
6665
DEPS_rustuv := std native:uv native:uv_support
6766
DEPS_native := std
68-
DEPS_syntax := std term serialize collections log fmt_macros debug
67+
DEPS_syntax := std term serialize collections log fmt_macros
6968
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
70-
collections time log graphviz debug
69+
collections time log graphviz
7170
DEPS_rustdoc := rustc native:hoedown serialize sync getopts collections \
72-
test time debug
71+
test time
7372
DEPS_flate := std native:miniz
7473
DEPS_arena := std collections
7574
DEPS_graphviz := std
@@ -80,7 +79,7 @@ DEPS_semver := std
8079
DEPS_uuid := std serialize rand
8180
DEPS_sync := std alloc
8281
DEPS_getopts := std
83-
DEPS_collections := std rand debug
82+
DEPS_collections := std rand
8483
DEPS_fourcc := syntax std
8584
DEPS_hexfloat := syntax std
8685
DEPS_num := std rand

branches/dist-snap/src/doc/guide-container.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ for (x, y) in it {
254254
}
255255
256256
// yield and print the last pair from the iterator
257-
println!("last: {}", it.next());
257+
println!("last: {:?}", it.next());
258258
259259
// the iterator is now fully consumed
260260
assert!(it.next().is_none());
@@ -349,9 +349,9 @@ returning another `DoubleEndedIterator` with `next` and `next_back` exchanged.
349349
~~~
350350
let xs = [1, 2, 3, 4, 5, 6];
351351
let mut it = xs.iter();
352-
println!("{}", it.next()); // prints `Some(1)`
353-
println!("{}", it.next()); // prints `Some(2)`
354-
println!("{}", it.next_back()); // prints `Some(6)`
352+
println!("{:?}", it.next()); // prints `Some(&1)`
353+
println!("{:?}", it.next()); // prints `Some(&2)`
354+
println!("{:?}", it.next_back()); // prints `Some(&6)`
355355
356356
// prints `5`, `4` and `3`
357357
for &x in it.rev() {
@@ -367,7 +367,7 @@ let xs = [1, 2, 3, 4];
367367
let ys = [5, 6, 7, 8];
368368
let mut it = xs.iter().chain(ys.iter()).map(|&x| x * 2);
369369
370-
println!("{}", it.next()); // prints `Some(2)`
370+
println!("{:?}", it.next()); // prints `Some(2)`
371371
372372
// prints `16`, `14`, `12`, `10`, `8`, `6`, `4`
373373
for x in it.rev() {
@@ -398,17 +398,17 @@ underlying iterators are.
398398
let xs = [1, 2, 3, 4, 5];
399399
let ys = ~[7, 9, 11];
400400
let mut it = xs.iter().chain(ys.iter());
401-
println!("{}", it.idx(0)); // prints `Some(1)`
402-
println!("{}", it.idx(5)); // prints `Some(7)`
403-
println!("{}", it.idx(7)); // prints `Some(11)`
404-
println!("{}", it.idx(8)); // prints `None`
401+
println!("{:?}", it.idx(0)); // prints `Some(&1)`
402+
println!("{:?}", it.idx(5)); // prints `Some(&7)`
403+
println!("{:?}", it.idx(7)); // prints `Some(&11)`
404+
println!("{:?}", it.idx(8)); // prints `None`
405405
406406
// yield two elements from the beginning, and one from the end
407407
it.next();
408408
it.next();
409409
it.next_back();
410410
411-
println!("{}", it.idx(0)); // prints `Some(3)`
412-
println!("{}", it.idx(4)); // prints `Some(9)`
413-
println!("{}", it.idx(6)); // prints `None`
411+
println!("{:?}", it.idx(0)); // prints `Some(&3)`
412+
println!("{:?}", it.idx(4)); // prints `Some(&9)`
413+
println!("{:?}", it.idx(6)); // prints `None`
414414
~~~

branches/dist-snap/src/doc/guide-pointers.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ you were writing this Rust code:
104104

105105
~~~rust
106106
# fn transform(p: Point) -> Point { p }
107-
#[deriving(Show)]
108107
struct Point {
109108
x: int,
110109
y: int,
@@ -113,7 +112,7 @@ struct Point {
113112
fn main() {
114113
let p0 = Point { x: 5, y: 10};
115114
let p1 = transform(p0);
116-
println!("{}", p1);
115+
println!("{:?}", p1);
117116
}
118117

119118
~~~
@@ -137,7 +136,6 @@ let p1 = transform(&p0);
137136
This does work, but you don't need to create those references! The better way to write this is simply:
138137

139138
~~~rust
140-
#[deriving(Show)]
141139
struct Point {
142140
x: int,
143141
y: int,
@@ -150,7 +148,7 @@ fn transform(p: Point) -> Point {
150148
fn main() {
151149
let p0 = Point { x: 5, y: 10};
152150
let p1 = transform(p0);
153-
println!("{}", p1);
151+
println!("{:?}", p1);
154152
}
155153
~~~
156154

@@ -187,15 +185,15 @@ trait. Therefore, unboxed traits don't make any sense, and aren't allowed.
187185
Sometimes, you need a recursive data structure. The simplest is known as a 'cons list':
188186

189187
~~~rust
190-
#[deriving(Show)]
188+
191189
enum List<T> {
192190
Nil,
193191
Cons(T, Box<List<T>>),
194192
}
195193

196194
fn main() {
197195
let list: List<int> = Cons(1, box Cons(2, box Cons(3, box Nil)));
198-
println!("{}", list);
196+
println!("{:?}", list);
199197
}
200198
~~~
201199

@@ -279,7 +277,7 @@ fn main() {
279277
let origin = &Point { x: 0.0, y: 0.0 };
280278
let p1 = box Point { x: 5.0, y: 3.0 };
281279

282-
println!("{}", compute_distance(origin, p1));
280+
println!("{:?}", compute_distance(origin, p1));
283281
}
284282
~~~
285283

@@ -318,11 +316,11 @@ fn main() {
318316
let mut x = box 5;
319317
if *x < 10 {
320318
let y = &x;
321-
println!("Oh no: {}", y);
319+
println!("Oh no: {:?}", y);
322320
return;
323321
}
324322
*x -= 1;
325-
println!("Oh no: {}", x);
323+
println!("Oh no: {:?}", x);
326324
}
327325
~~~
328326

@@ -337,11 +335,11 @@ fn main() {
337335
let y = &x;
338336
*x -= 1;
339337
340-
println!("Oh no: {}", y);
338+
println!("Oh no: {:?}", y);
341339
return;
342340
}
343341
*x -= 1;
344-
println!("Oh no: {}", x);
342+
println!("Oh no: {:?}", x);
345343
}
346344
~~~
347345

branches/dist-snap/src/doc/guide-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ fn fib(n: u64) -> u64 {
280280
281281
let mut delayed_fib = sync::Future::spawn(proc() fib(50));
282282
make_a_sandwich();
283-
println!("fib(50) = {}", delayed_fib.get())
283+
println!("fib(50) = {:?}", delayed_fib.get())
284284
# }
285285
~~~
286286

branches/dist-snap/src/doc/tutorial.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -405,20 +405,14 @@ will often see in examples, and its related family of macros: `print!`,
405405
that [printf][pf] has. Unlike printf, `format!` will give you a compile-time
406406
error when the types of the directives don't match the types of the arguments.
407407

408-
~~~
408+
~~~~
409+
# let mystery_object = ();
410+
409411
// `{}` will print the "default format" of a type
410412
println!("{} is {}", "the answer", 43);
411-
~~~
412413
413-
~~~~
414-
extern crate debug;
415-
416-
# fn main() {
417-
# let mystery_object = ();
418-
// `{:?}` will conveniently print any type,
419-
// but requires the `debug` crate to be linked in
414+
// `{:?}` will conveniently print any type
420415
println!("what is this thing: {:?}", mystery_object);
421-
# }
422416
~~~~
423417

424418
[pf]: http://en.cppreference.com/w/cpp/io/c/fprintf
@@ -704,8 +698,8 @@ When an enum has simple integer discriminators, you can apply the `as` cast
704698
operator to convert a variant to its discriminator value as an `int`:
705699

706700
~~~~
707-
# #[deriving(Show)] enum Direction { North }
708-
println!( "{} => {}", North, North as int );
701+
# enum Direction { North }
702+
println!( "{:?} => {}", North, North as int );
709703
~~~~
710704

711705
It is possible to set the discriminator values to chosen constant values:
@@ -2234,7 +2228,7 @@ method.
22342228
~~~~
22352229
# trait Printable { fn print(&self); }
22362230
impl Printable for int {
2237-
fn print(&self) { println!("{}", *self) }
2231+
fn print(&self) { println!("{:?}", *self) }
22382232
}
22392233
22402234
impl Printable for String {
@@ -2259,11 +2253,11 @@ types to be exactly as it is for `int`, above:
22592253
~~~~
22602254
# trait Printable { fn print(&self); }
22612255
impl Printable for f32 {
2262-
fn print(&self) { println!("{}", *self) }
2256+
fn print(&self) { println!("{:?}", *self) }
22632257
}
22642258
22652259
impl Printable for bool {
2266-
fn print(&self) { println!("{}", *self) }
2260+
fn print(&self) { println!("{:?}", *self) }
22672261
}
22682262
22692263
# true.print();
@@ -2276,11 +2270,8 @@ definition of `print` right in the trait definition, instead of just
22762270
giving its signature. That is, we can write the following:
22772271

22782272
~~~~
2279-
extern crate debug;
2280-
2281-
# fn main() {
22822273
trait Printable {
2283-
// Default method implementation
2274+
// Default method implementation
22842275
fn print(&self) { println!("{:?}", *self) }
22852276
}
22862277
@@ -2298,7 +2289,6 @@ impl Printable for f32 {}
22982289
# ("foo".to_string()).print();
22992290
# true.print();
23002291
# 3.14159.print();
2301-
# }
23022292
~~~~
23032293

23042294
Here, the impls of `Printable` for `int`, `bool`, and `f32` don't

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,8 @@
7474
extern crate core;
7575
extern crate libc;
7676

77-
7877
// Allow testing this library
7978

80-
#[cfg(test)] extern crate debug;
8179
#[cfg(test)] extern crate sync;
8280
#[cfg(test)] extern crate native;
8381
#[cfg(test)] #[phase(syntax, link)] extern crate std;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#![deny(deprecated_owned_vector)]
2626

2727
extern crate rand;
28-
extern crate debug;
2928

3029
#[cfg(test)] extern crate test;
3130
#[cfg(test)] #[phase(syntax, link)] extern crate log;

branches/dist-snap/src/libcore/mem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ pub unsafe fn overwrite<T>(dst: *mut T, src: T) {
160160
intrinsics::move_val_init(&mut *dst, src)
161161
}
162162

163-
/// Deprecated, use `overwrite` instead
163+
/// Deprecated, use move_val_init() instead
164164
#[inline]
165-
#[deprecated = "this function has been renamed to `overwrite`"]
165+
#[deprecated = "this function has been renamed to move_val_init()"]
166166
pub unsafe fn move_val_init<T>(dst: &mut T, src: T) {
167167
overwrite(dst, src)
168168
}

branches/dist-snap/src/libcore/ops.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
* demonstrates adding and subtracting two `Point`s.
2828
*
2929
* ```rust
30-
* #[deriving(Show)]
3130
* struct Point {
3231
* x: int,
3332
* y: int
@@ -45,8 +44,8 @@
4544
* }
4645
* }
4746
* fn main() {
48-
* println!("{}", Point {x: 1, y: 0} + Point {x: 2, y: 3});
49-
* println!("{}", Point {x: 1, y: 0} - Point {x: 2, y: 3});
47+
* println!("{:?}", Point {x: 1, y: 0} + Point {x: 2, y: 3});
48+
* println!("{:?}", Point {x: 1, y: 0} - Point {x: 2, y: 3});
5049
* }
5150
* ```
5251
*

branches/dist-snap/src/libcore/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ pub trait ImmutableVector<'a, T> {
419419
* ```rust
420420
* let v = &[1,2,3,4];
421421
* for win in v.windows(2) {
422-
* println!("{}", win);
422+
* println!("{:?}", win);
423423
* }
424424
* ```
425425
*
@@ -444,7 +444,7 @@ pub trait ImmutableVector<'a, T> {
444444
* ```rust
445445
* let v = &[1,2,3,4,5];
446446
* for win in v.chunks(2) {
447-
* println!("{}", win);
447+
* println!("{:?}", win);
448448
* }
449449
* ```
450450
*

0 commit comments

Comments
 (0)