Skip to content

Commit 87243c1

Browse files
committed
---
yaml --- r: 152284 b: refs/heads/try2 c: 6509092 h: refs/heads/master v: v3
1 parent 8b98046 commit 87243c1

File tree

183 files changed

+2432
-2887
lines changed

Some content is hidden

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

183 files changed

+2432
-2887
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ba3ba002d528d1e187a835a7afde6b5f51659d68
8+
refs/heads/try2: 650909244eee51b4fd70389538c6b784ccf005c7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/crates.mk

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,36 +60,36 @@ DEPS_core :=
6060
DEPS_rlibc :=
6161
DEPS_alloc := core libc native:jemalloc
6262
DEPS_debug := std
63-
DEPS_std := core rand libc alloc collections native:rustrt native:backtrace
63+
DEPS_std := core rand libc alloc native:rustrt native:backtrace
6464
DEPS_graphviz := std
6565
DEPS_green := std native:context_switch
6666
DEPS_rustuv := std native:uv native:uv_support
6767
DEPS_native := std
68-
DEPS_syntax := std term serialize log fmt_macros debug
68+
DEPS_syntax := std term serialize collections log fmt_macros debug
6969
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
70-
time log graphviz debug
71-
DEPS_rustdoc := rustc native:hoedown serialize sync getopts \
70+
collections time log graphviz debug
71+
DEPS_rustdoc := rustc native:hoedown serialize sync getopts collections \
7272
test time debug
7373
DEPS_flate := std native:miniz
74-
DEPS_arena := std
74+
DEPS_arena := std collections
7575
DEPS_graphviz := std
7676
DEPS_glob := std
77-
DEPS_serialize := std log
78-
DEPS_term := std log
77+
DEPS_serialize := std collections log
78+
DEPS_term := std collections log
7979
DEPS_semver := std
8080
DEPS_uuid := std serialize
8181
DEPS_sync := std alloc
8282
DEPS_getopts := std
83-
DEPS_collections := core alloc
83+
DEPS_collections := std debug
8484
DEPS_fourcc := syntax std
8585
DEPS_hexfloat := syntax std
8686
DEPS_num := std
87-
DEPS_test := std getopts serialize term time regex
87+
DEPS_test := std collections getopts serialize term time regex
8888
DEPS_time := std serialize sync
8989
DEPS_rand := core
90-
DEPS_url := std
90+
DEPS_url := std collections
9191
DEPS_log := std sync
92-
DEPS_regex := std
92+
DEPS_regex := std collections
9393
DEPS_regex_macros = syntax std regex
9494
DEPS_fmt_macros = std
9595

@@ -101,11 +101,9 @@ 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
105104
ONLY_RLIB_rlibc := 1
106105
ONLY_RLIB_alloc := 1
107106
ONLY_RLIB_rand := 1
108-
ONLY_RLIB_collections := 1
109107

110108
################################################################################
111109
# You should not need to edit below this line

branches/try2/mk/docs.mk

Lines changed: 3 additions & 5 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-
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
113+
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,17 +156,15 @@ 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-
@$(call E, rustdoc: $@)
160-
$(Q)$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) \
161-
--markdown-css http://doc.rust-lang.org/rust.css $<
159+
$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css http://doc.rust-lang.org/rust.css $<
162160

163161
define DEF_DOC
164162

165163
# HTML (rustdoc)
166164
DOC_TARGETS += doc/$(1).html
167165
doc/$(1).html: $$(D)/$(1).md $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(1)) | doc/
168166
@$$(call E, rustdoc: $$@)
169-
$$(Q)$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) $$<
167+
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) $$<
170168

171169
ifneq ($(ONLY_HTML_DOCS),1)
172170

branches/try2/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).as_slice());
364+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
375+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
395+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
431+
.expect(format!("failed to exec `{}`", gdb_path));
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).as_slice());
1210+
input).expect(format!("failed to exec `{}`", prog));
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).as_slice());
1336+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
1366+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
1380+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
1403+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
1417+
.expect(format!("failed to exec `{}`", config.adb_path));
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).as_slice());
1451+
.expect(format!("failed to exec `{}`", config.adb_path));
14521452

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

branches/try2/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(mem::size_of::<T>() as size_t) as *mut T;
216+
let ptr = malloc(std::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-
ptr::write(&mut *ptr, value);
223+
mem::overwrite(&mut *ptr, value);
224224
Unique{ptr: ptr}
225225
}
226226
}

branches/try2/src/doc/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ 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)
6465
* [The `log` library](log/index.html)
6566

6667
# Tooling

branches/try2/src/doc/tutorial.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,8 @@ illegal to copy and pass by value.
20582058
Generic `type`, `struct`, and `enum` declarations follow the same pattern:
20592059

20602060
~~~~
2061-
type Set<T> = std::collections::HashMap<T, ()>;
2061+
extern crate collections;
2062+
type Set<T> = collections::HashMap<T, ()>;
20622063
20632064
struct Stack<T> {
20642065
elements: Vec<T>

branches/try2/src/liballoc/rc.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ 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;
3736

3837
use heap::deallocate;
3938

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

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-
188181
/// Weak reference to a reference-counted box
189182
#[unsafe_no_drop_flag]
190183
pub struct Weak<T> {

branches/try2/src/libarena/lib.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@
2828
html_root_url = "http://doc.rust-lang.org/")]
2929
#![allow(missing_doc)]
3030

31+
extern crate collections;
32+
3133
use std::cell::{Cell, RefCell};
3234
use std::cmp;
3335
use std::intrinsics::{TyDesc, get_tydesc};
3436
use std::intrinsics;
3537
use std::mem;
3638
use std::num;
37-
use std::ptr;
39+
use std::ptr::read;
3840
use std::rc::Rc;
3941
use std::rt::heap::allocate;
4042

@@ -207,7 +209,7 @@ impl Arena {
207209
let ptr = self.alloc_copy_inner(mem::size_of::<T>(),
208210
mem::min_align_of::<T>());
209211
let ptr = ptr as *mut T;
210-
ptr::write(&mut (*ptr), op());
212+
mem::overwrite(&mut (*ptr), op());
211213
return &*ptr;
212214
}
213215
}
@@ -260,7 +262,7 @@ impl Arena {
260262
// has *not* been initialized yet.
261263
*ty_ptr = mem::transmute(tydesc);
262264
// Actually initialize it
263-
ptr::write(&mut(*ptr), op());
265+
mem::overwrite(&mut(*ptr), op());
264266
// Now that we are done, update the tydesc to indicate that
265267
// the object is there.
266268
*ty_ptr = bitpack_tydesc_ptr(tydesc, true);
@@ -358,7 +360,7 @@ impl<T> TypedArenaChunk<T> {
358360
let mut chunk = unsafe {
359361
let chunk = allocate(size, mem::min_align_of::<TypedArenaChunk<T>>());
360362
let mut chunk: Box<TypedArenaChunk<T>> = mem::transmute(chunk);
361-
ptr::write(&mut chunk.next, next);
363+
mem::overwrite(&mut chunk.next, next);
362364
chunk
363365
};
364366

@@ -374,7 +376,7 @@ impl<T> TypedArenaChunk<T> {
374376
if intrinsics::needs_drop::<T>() {
375377
let mut start = self.start();
376378
for _ in range(0, len) {
377-
ptr::read(start as *T); // run the destructor on the pointer
379+
read(start as *T); // run the destructor on the pointer
378380
start = start.offset(mem::size_of::<T>() as int)
379381
}
380382
}
@@ -440,7 +442,7 @@ impl<T> TypedArena<T> {
440442
}
441443

442444
let ptr: &'a mut T = mem::transmute(this.ptr);
443-
ptr::write(ptr, object);
445+
mem::overwrite(ptr, object);
444446
this.ptr = this.ptr.offset(1);
445447
let ptr: &'a T = ptr;
446448
ptr

0 commit comments

Comments
 (0)