Skip to content

Commit e51a9cb

Browse files
committed
---
yaml --- r: 116479 b: refs/heads/snap-stage3 c: a7ac6a4 h: refs/heads/master i: 116477: a229565 116475: 1df998d 116471: 7a8eeeb 116463: 96959e8 116447: 53303f9 116415: 0def2ff 116351: f61254c 116223: 7b635a0 v: v3
1 parent 1c5e4a0 commit e51a9cb

File tree

40 files changed

+1666
-1504
lines changed

40 files changed

+1666
-1504
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: bee4e6adac17f87b1cdc26ab69f8c0f5d82575a3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8e4e3abb1d0a3008d46fd56bba03dc20a81e9481
4+
refs/heads/snap-stage3: a7ac6a4eb707fd90dfbc2b2f84c7fed7faec5d90
55
refs/heads/try: 009d898a9422ac04c1aa60c0e9aff3abc5fa4672
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/crates.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
101101
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
102102

103103
ONLY_RLIB_core := 1
104+
ONLY_RLIB_libc := 1
104105
ONLY_RLIB_rlibc := 1
105106
ONLY_RLIB_alloc := 1
106107
ONLY_RLIB_rand := 1

branches/snap-stage3/mk/docs.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ HTML_DEPS += doc/version_info.html
110110
doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
111111
$(wildcard $(D)/*.*) | doc/
112112
@$(call E, version-info: $@)
113-
sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
113+
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
114114
$(CFG_VER_HASH) | head -c 8)/;\
115115
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
116116

@@ -156,15 +156,17 @@ doc/footer.tex: $(D)/footer.inc | doc/
156156
# HTML (rustdoc)
157157
DOC_TARGETS += doc/not_found.html
158158
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
159-
$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css http://doc.rust-lang.org/rust.css $<
159+
@$(call E, rustdoc: $@)
160+
$(Q)$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) \
161+
--markdown-css http://doc.rust-lang.org/rust.css $<
160162

161163
define DEF_DOC
162164

163165
# HTML (rustdoc)
164166
DOC_TARGETS += doc/$(1).html
165167
doc/$(1).html: $$(D)/$(1).md $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(1)) | doc/
166168
@$$(call E, rustdoc: $$@)
167-
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) $$<
169+
$$(Q)$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) $$<
168170

169171
ifneq ($(ONLY_HTML_DOCS),1)
170172

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
361361
],
362362
vec!(("".to_string(), "".to_string())),
363363
Some("".to_string()))
364-
.expect(format!("failed to exec `{}`", config.adb_path));
364+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
365365

366366
procsrv::run("",
367367
config.adb_path.as_slice(),
@@ -372,7 +372,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
372372
],
373373
vec!(("".to_string(), "".to_string())),
374374
Some("".to_string()))
375-
.expect(format!("failed to exec `{}`", config.adb_path));
375+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
376376

377377
let adb_arg = format!("export LD_LIBRARY_PATH={}; \
378378
gdbserver :5039 {}/{}",
@@ -392,7 +392,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
392392
vec!(("".to_string(),
393393
"".to_string())),
394394
Some("".to_string()))
395-
.expect(format!("failed to exec `{}`", config.adb_path));
395+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
396396
loop {
397397
//waiting 1 second for gdbserver start
398398
timer::sleep(1000);
@@ -428,7 +428,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
428428
debugger_opts.as_slice(),
429429
vec!(("".to_string(), "".to_string())),
430430
None)
431-
.expect(format!("failed to exec `{}`", gdb_path));
431+
.expect(format!("failed to exec `{}`", gdb_path).as_slice());
432432
let cmdline = {
433433
let cmdline = make_cmdline("",
434434
"arm-linux-androideabi-gdb",
@@ -1207,7 +1207,7 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
12071207
prog.as_slice(),
12081208
args.as_slice(),
12091209
env,
1210-
input).expect(format!("failed to exec `{}`", prog));
1210+
input).expect(format!("failed to exec `{}`", prog).as_slice());
12111211
dump_output(config, testfile, out.as_slice(), err.as_slice());
12121212
return ProcRes {
12131213
status: status,
@@ -1333,7 +1333,7 @@ fn _arm_exec_compiled_test(config: &Config,
13331333
],
13341334
vec!(("".to_string(), "".to_string())),
13351335
Some("".to_string()))
1336-
.expect(format!("failed to exec `{}`", config.adb_path));
1336+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
13371337

13381338
if config.verbose {
13391339
println!("push ({}) {} {} {}",
@@ -1363,7 +1363,7 @@ fn _arm_exec_compiled_test(config: &Config,
13631363
config.adb_path.as_slice(),
13641364
runargs.as_slice(),
13651365
vec!(("".to_string(), "".to_string())), Some("".to_string()))
1366-
.expect(format!("failed to exec `{}`", config.adb_path));
1366+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
13671367

13681368
// get exitcode of result
13691369
runargs = Vec::new();
@@ -1377,7 +1377,7 @@ fn _arm_exec_compiled_test(config: &Config,
13771377
runargs.as_slice(),
13781378
vec!(("".to_string(), "".to_string())),
13791379
Some("".to_string()))
1380-
.expect(format!("failed to exec `{}`", config.adb_path));
1380+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
13811381

13821382
let mut exitcode: int = 0;
13831383
for c in exitcode_out.as_slice().chars() {
@@ -1400,7 +1400,7 @@ fn _arm_exec_compiled_test(config: &Config,
14001400
runargs.as_slice(),
14011401
vec!(("".to_string(), "".to_string())),
14021402
Some("".to_string()))
1403-
.expect(format!("failed to exec `{}`", config.adb_path));
1403+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
14041404

14051405
// get stderr of result
14061406
runargs = Vec::new();
@@ -1414,7 +1414,7 @@ fn _arm_exec_compiled_test(config: &Config,
14141414
runargs.as_slice(),
14151415
vec!(("".to_string(), "".to_string())),
14161416
Some("".to_string()))
1417-
.expect(format!("failed to exec `{}`", config.adb_path));
1417+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
14181418

14191419
dump_output(config,
14201420
testfile,
@@ -1448,7 +1448,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
14481448
vec!(("".to_string(),
14491449
"".to_string())),
14501450
Some("".to_string()))
1451-
.expect(format!("failed to exec `{}`", config.adb_path));
1451+
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
14521452

14531453
if config.verbose {
14541454
println!("push ({}) {} {} {}",

branches/snap-stage3/src/doc/guide-unsafe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ pub struct Unique<T> {
213213
impl<T: Send> Unique<T> {
214214
pub fn new(value: T) -> Unique<T> {
215215
unsafe {
216-
let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;
216+
let ptr = malloc(mem::size_of::<T>() as size_t) as *mut T;
217217
// we *need* valid pointer.
218218
assert!(!ptr.is_null());
219219
// `*ptr` is uninitialized, and `*ptr = value` would
220220
// attempt to destroy it `overwrite` moves a value into
221221
// this memory without attempting to drop the original
222222
// value.
223-
mem::overwrite(&mut *ptr, value);
223+
ptr::write(&mut *ptr, value);
224224
Unique{ptr: ptr}
225225
}
226226
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ li {list-style-type: none; }
6161
* [The `time` library](time/index.html)
6262
* [The `uuid` 128-bit universally unique identifier library](uuid/index.html)
6363
* [The `url` library](url/index.html)
64-
* [The `workcache` library](workcache/index.html)
6564
* [The `log` library](log/index.html)
6665

6766
# Tooling

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use core::option::{Option, Some, None};
3333
use core::ptr;
3434
use core::ptr::RawPtr;
3535
use core::mem::{min_align_of, size_of};
36+
use core::fmt;
3637

3738
use heap::deallocate;
3839

@@ -178,6 +179,12 @@ impl<T: Ord> Ord for Rc<T> {
178179
fn cmp(&self, other: &Rc<T>) -> Ordering { (**self).cmp(&**other) }
179180
}
180181

182+
impl<T: fmt::Show> fmt::Show for Rc<T> {
183+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
184+
(**self).fmt(f)
185+
}
186+
}
187+
181188
/// Weak reference to a reference-counted box
182189
#[unsafe_no_drop_flag]
183190
pub struct Weak<T> {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use std::intrinsics::{TyDesc, get_tydesc};
3636
use std::intrinsics;
3737
use std::mem;
3838
use std::num;
39-
use std::ptr::read;
39+
use std::ptr;
4040
use std::rc::Rc;
4141
use std::rt::heap::allocate;
4242

@@ -209,7 +209,7 @@ impl Arena {
209209
let ptr = self.alloc_copy_inner(mem::size_of::<T>(),
210210
mem::min_align_of::<T>());
211211
let ptr = ptr as *mut T;
212-
mem::overwrite(&mut (*ptr), op());
212+
ptr::write(&mut (*ptr), op());
213213
return &*ptr;
214214
}
215215
}
@@ -262,7 +262,7 @@ impl Arena {
262262
// has *not* been initialized yet.
263263
*ty_ptr = mem::transmute(tydesc);
264264
// Actually initialize it
265-
mem::overwrite(&mut(*ptr), op());
265+
ptr::write(&mut(*ptr), op());
266266
// Now that we are done, update the tydesc to indicate that
267267
// the object is there.
268268
*ty_ptr = bitpack_tydesc_ptr(tydesc, true);
@@ -360,7 +360,7 @@ impl<T> TypedArenaChunk<T> {
360360
let mut chunk = unsafe {
361361
let chunk = allocate(size, mem::min_align_of::<TypedArenaChunk<T>>());
362362
let mut chunk: Box<TypedArenaChunk<T>> = mem::transmute(chunk);
363-
mem::overwrite(&mut chunk.next, next);
363+
ptr::write(&mut chunk.next, next);
364364
chunk
365365
};
366366

@@ -376,7 +376,7 @@ impl<T> TypedArenaChunk<T> {
376376
if intrinsics::needs_drop::<T>() {
377377
let mut start = self.start();
378378
for _ in range(0, len) {
379-
read(start as *T); // run the destructor on the pointer
379+
ptr::read(start as *T); // run the destructor on the pointer
380380
start = start.offset(mem::size_of::<T>() as int)
381381
}
382382
}
@@ -442,7 +442,7 @@ impl<T> TypedArena<T> {
442442
}
443443

444444
let ptr: &'a mut T = mem::transmute(this.ptr);
445-
mem::overwrite(ptr, object);
445+
ptr::write(ptr, object);
446446
this.ptr = this.ptr.offset(1);
447447
let ptr: &'a T = ptr;
448448
ptr

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
#![allow(missing_doc)]
1414

1515
use std::clone::Clone;
16-
use std::mem::{overwrite, zeroed, replace, swap};
16+
use std::mem::{zeroed, replace, swap};
17+
use std::ptr;
1718
use std::slice;
1819

1920
/// A priority queue implemented with a binary heap
@@ -163,13 +164,13 @@ impl<T: Ord> PriorityQueue<T> {
163164
let parent = (pos - 1) >> 1;
164165
if new > *self.data.get(parent) {
165166
let x = replace(self.data.get_mut(parent), zeroed());
166-
overwrite(self.data.get_mut(pos), x);
167+
ptr::write(self.data.get_mut(pos), x);
167168
pos = parent;
168169
continue
169170
}
170171
break
171172
}
172-
overwrite(self.data.get_mut(pos), new);
173+
ptr::write(self.data.get_mut(pos), new);
173174
}
174175
}
175176

@@ -185,12 +186,12 @@ impl<T: Ord> PriorityQueue<T> {
185186
child = right;
186187
}
187188
let x = replace(self.data.get_mut(child), zeroed());
188-
overwrite(self.data.get_mut(pos), x);
189+
ptr::write(self.data.get_mut(pos), x);
189190
pos = child;
190191
child = 2 * pos + 1;
191192
}
192193

193-
overwrite(self.data.get_mut(pos), new);
194+
ptr::write(self.data.get_mut(pos), new);
194195
self.siftup(start, pos);
195196
}
196197
}

branches/snap-stage3/src/libcore/fmt/rt.rs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
//! These definitions are similar to their `ct` equivalents, but differ in that
1515
//! these can be statically allocated and are slightly optimized for the runtime
1616
17-
#![allow(missing_doc)]
18-
#![doc(hidden)]
19-
2017
use option::Option;
2118

19+
#[doc(hidden)]
2220
pub enum Piece<'a> {
2321
String(&'a str),
2422
// FIXME(#8259): this shouldn't require the unit-value here
2523
CurrentArgument(()),
2624
Argument(Argument<'a>),
2725
}
2826

27+
#[doc(hidden)]
2928
pub struct Argument<'a> {
3029
pub position: Position,
3130
pub format: FormatSpec,
3231
pub method: Option<&'a Method<'a>>
3332
}
3433

34+
#[doc(hidden)]
3535
pub struct FormatSpec {
3636
pub fill: char,
3737
pub align: Alignment,
@@ -40,38 +40,60 @@ pub struct FormatSpec {
4040
pub width: Count,
4141
}
4242

43+
/// Possible alignments that can be requested as part of a formatting directive.
4344
#[deriving(PartialEq)]
4445
pub enum Alignment {
46+
/// Indication that contents should be left-aligned.
4547
AlignLeft,
48+
/// Indication that contents should be right-aligned.
4649
AlignRight,
50+
/// No alignment was requested.
4751
AlignUnknown,
4852
}
4953

54+
#[doc(hidden)]
5055
pub enum Count {
5156
CountIs(uint), CountIsParam(uint), CountIsNextParam, CountImplied,
5257
}
5358

59+
#[doc(hidden)]
5460
pub enum Position {
5561
ArgumentNext, ArgumentIs(uint)
5662
}
5763

64+
/// Flags which can be passed to formatting via a directive.
65+
///
66+
/// These flags are discovered through the `flags` field of the `Formatter`
67+
/// structure. The flag in that structure is a union of these flags into a
68+
/// `uint` where each flag's discriminant is the corresponding bit.
5869
pub enum Flag {
70+
/// A flag which enables number formatting to always print the sign of a
71+
/// number.
5972
FlagSignPlus,
73+
/// Currently not a used flag
6074
FlagSignMinus,
75+
/// Indicates that the "alternate formatting" for a type should be used.
76+
///
77+
/// The meaning of this flag is type-specific.
6178
FlagAlternate,
79+
/// Indicates that padding should be done with a `0` character as well as
80+
/// being aware of the sign to be printed.
6281
FlagSignAwareZeroPad,
6382
}
6483

84+
#[doc(hidden)]
6585
pub enum Method<'a> {
6686
Plural(Option<uint>, &'a [PluralArm<'a>], &'a [Piece<'a>]),
6787
Select(&'a [SelectArm<'a>], &'a [Piece<'a>]),
6888
}
6989

90+
#[doc(hidden)]
7091
pub enum PluralSelector {
7192
Keyword(PluralKeyword),
7293
Literal(uint),
7394
}
7495

96+
#[doc(hidden)]
7597
pub enum PluralKeyword {
7698
Zero,
7799
One,
@@ -80,11 +102,13 @@ pub enum PluralKeyword {
80102
Many,
81103
}
82104

105+
#[doc(hidden)]
83106
pub struct PluralArm<'a> {
84107
pub selector: PluralSelector,
85108
pub result: &'a [Piece<'a>],
86109
}
87110

111+
#[doc(hidden)]
88112
pub struct SelectArm<'a> {
89113
pub selector: &'a str,
90114
pub result: &'a [Piece<'a>],

0 commit comments

Comments
 (0)