Skip to content

Commit e99b56f

Browse files
committed
---
yaml --- r: 234933 b: refs/heads/stable c: 04daae7 h: refs/heads/master i: 234931: 1f1a3d6 v: v3
1 parent 5493b98 commit e99b56f

File tree

130 files changed

+5103
-5428
lines changed

Some content is hidden

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

130 files changed

+5103
-5428
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 1aabbd01c3fb28a15510f37877d5471e7e725b13
32+
refs/heads/stable: 04daae77be0c74a5df6076b3b0c3a121e464fedf
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/RELEASES.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Version 1.1.0 (June 2015)
2121
Highlights
2222
----------
2323

24-
* The [`std::fs` module has been expanded][fs-expand] to expand the set of
24+
* The [`std::fs` module has been expanded][fs] to expand the set of
2525
functionality exposed:
2626
* `DirEntry` now supports optimizations like `file_type` and `metadata` which
2727
don't incur a syscall on some platforms.
@@ -38,11 +38,11 @@ Highlights
3838
Libraries
3939
---------
4040

41-
* The `str::split_whitespace` method splits a string on unicode
41+
* The [`str::split_whitespace`] method splits a string on unicode
4242
whitespace boundaries.
4343
* On both Windows and Unix, new extension traits provide conversion of
4444
I/O types to and from the underlying system handles. On Unix, these
45-
traits are [`FrowRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
45+
traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
4646
and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
4747
`TcpListener`, and `UpdSocket`. Further implementations for
4848
`std::process` will be stabilized later.
@@ -94,8 +94,7 @@ Misc
9494
* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
9595
with `Drop`][drop].
9696

97-
[`split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
98-
[`Iterator::cloned`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cloned
97+
[`str::split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
9998
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
10099
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
101100
[`std::os::unix::symlink`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
@@ -265,7 +264,6 @@ Misc
265264
[sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
266265
[th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
267266
[send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
268-
[scoped]: http://static.rust-lang.org/doc/master/std/thread/fn.scoped.html
269267
[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
270268
[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
271269
[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
@@ -275,12 +273,10 @@ Misc
275273
[string-pattern]: https://github.com/rust-lang/rust/pull/22466
276274
[oibit-final]: https://github.com/rust-lang/rust/pull/21689
277275
[reflect]: https://github.com/rust-lang/rust/pull/23712
278-
[debug-builder]: https://github.com/rust-lang/rfcs/blob/master/text/0640-debug-improvements.md
279276
[conversion]: https://github.com/rust-lang/rfcs/pull/529
280277
[num-traits]: https://github.com/rust-lang/rust/pull/23549
281278
[index-value]: https://github.com/rust-lang/rust/pull/23601
282279
[dropck]: https://github.com/rust-lang/rfcs/pull/769
283-
[fundamental]: https://github.com/rust-lang/rfcs/pull/1023
284280
[ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
285281
[fn-inherit]: https://github.com/rust-lang/rust/pull/23282
286282
[fn-blanket]: https://github.com/rust-lang/rust/pull/23895
@@ -383,7 +379,6 @@ Version 1.0.0-alpha.2 (February 2015)
383379
[osstr]: https://github.com/rust-lang/rust/pull/21488
384380
[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
385381
[Self]: https://github.com/rust-lang/rust/pull/22158
386-
[ufcs]: https://github.com/rust-lang/rust/pull/21077
387382
[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
388383
[un]: https://github.com/rust-lang/rust/pull/22256
389384

branches/stable/mk/cfg/x86_64-pc-windows-msvc.mk

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -23,64 +23,6 @@ CFG_RUN_x86_64-pc-windows-msvc=$(2)
2323
CFG_RUN_TARG_x86_64-pc-windows-msvc=$(call CFG_RUN_x86_64-pc-windows-msvc,,$(2))
2424
CFG_GNU_TRIPLE_x86_64-pc-windows-msvc := x86_64-pc-win32
2525

26-
# These two environment variables are scraped by the `./configure` script and
27-
# are necessary for `cl.exe` to find standard headers (the INCLUDE variable) and
28-
# for `link.exe` to find standard libraries (the LIB variable).
29-
ifdef CFG_MSVC_INCLUDE_PATH
30-
export INCLUDE := $(CFG_MSVC_INCLUDE_PATH)
31-
endif
32-
ifdef CFG_MSVC_LIB_PATH
33-
export LIB := $(CFG_MSVC_LIB_PATH)
34-
endif
35-
36-
# Unfortunately `link.exe` is also a program in `/usr/bin` on MinGW installs,
37-
# but it's not the one that we want. As a result we make sure that our detected
38-
# `link.exe` shows up in PATH first.
39-
ifdef CFG_MSVC_LINK
40-
export PATH := $(CFG_MSVC_ROOT)/VC/bin/amd64:$(PATH)
41-
endif
42-
43-
# There are more comments about this available in the target specification for
44-
# Windows MSVC in the compiler, but the gist of it is that we use `llvm-ar.exe`
45-
# instead of `lib.exe` for assembling archives, so we need to inject this custom
46-
# dependency here.
47-
NATIVE_TOOL_DEPS_core_T_x86_64-pc-windows-msvc += llvm-ar.exe
48-
INSTALLED_BINS_x86_64-pc-windows-msvc += llvm-ar.exe
49-
50-
# When working with MSVC on windows, each DLL needs to explicitly declare its
51-
# interface to the outside world through some means. The options for doing so
52-
# include:
53-
#
54-
# 1. A custom attribute on each function itself
55-
# 2. A linker argument saying what to export
56-
# 3. A file which lists all symbols that need to be exported
57-
#
58-
# The Rust compiler takes care (1) for us for all Rust code by annotating all
59-
# public-facing functions with dllexport, but we have a few native dependencies
60-
# which need to cross the DLL boundary. The most important of these dependencies
61-
# is LLVM which is linked into `rustc_llvm.dll` but primarily used from
62-
# `rustc_trans.dll`. This means that many of LLVM's C API functions need to be
63-
# exposed from `rustc_llvm.dll` to be forwarded over the boundary.
64-
#
65-
# Unfortunately, at this time, LLVM does not handle this sort of exportation on
66-
# Windows for us, so we're forced to do it ourselves if we want it (which seems
67-
# like the path of least resistance right now). To do this we generate a `.DEF`
68-
# file [1] which we then custom-pass to the linker when building the rustc_llvm
69-
# crate. This DEF file list all symbols that are exported from
70-
# `src/librustc_llvm/lib.rs` and is generated by a small python script.
71-
#
72-
# Fun times!
73-
#
74-
# [1]: https://msdn.microsoft.com/en-us/library/28d6s79h.aspx
75-
RUSTFLAGS_rustc_llvm_T_x86_64-pc-windows-msvc += \
76-
-C link-args="-DEF:x86_64-pc-windows-msvc/rt/rustc_llvm.def"
77-
CUSTOM_DEPS_rustc_llvm_T_x86_64-pc-windows-msvc += \
78-
x86_64-pc-windows-msvc/rt/rustc_llvm.def
79-
80-
x86_64-pc-windows-msvc/rt/rustc_llvm.def: $(S)src/etc/mklldef.py \
81-
$(S)src/librustc_llvm/lib.rs
82-
$(CFG_PYTHON) $^ $@ rustc_llvm-$(CFG_FILENAME_EXTRA)
83-
8426
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
8527
# bootstrapping from itself. This is relevant during stage0, and other parts of
8628
# the build system take this into account.

branches/stable/mk/platform.mk

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,72 @@ endef
238238

239239
$(foreach target,$(CFG_TARGET), \
240240
$(eval $(call CFG_MAKE_TOOLCHAIN,$(target))))
241+
242+
# These two environment variables are scraped by the `./configure` script and
243+
# are necessary for `cl.exe` to find standard headers (the INCLUDE variable) and
244+
# for `link.exe` to find standard libraries (the LIB variable).
245+
ifdef CFG_MSVC_INCLUDE_PATH
246+
export INCLUDE := $(CFG_MSVC_INCLUDE_PATH)
247+
endif
248+
ifdef CFG_MSVC_LIB_PATH
249+
export LIB := $(CFG_MSVC_LIB_PATH)
250+
endif
251+
252+
# Unfortunately `link.exe` is also a program in `/usr/bin` on MinGW installs,
253+
# but it's not the one that we want. As a result we make sure that our detected
254+
# `link.exe` shows up in PATH first.
255+
ifdef CFG_MSVC_LINK
256+
export PATH := $(CFG_MSVC_ROOT)/VC/bin/amd64:$(PATH)
257+
endif
258+
259+
# There are more comments about this available in the target specification for
260+
# Windows MSVC in the compiler, but the gist of it is that we use `llvm-ar.exe`
261+
# instead of `lib.exe` for assembling archives, so we need to inject this custom
262+
# dependency here.
263+
define ADD_LLVM_AR_TO_MSVC_DEPS
264+
ifeq ($$(findstring msvc,$(1)),msvc)
265+
NATIVE_TOOL_DEPS_core_T_$(1) += llvm-ar.exe
266+
INSTALLED_BINS_$(1) += llvm-ar.exe
267+
endif
268+
endef
269+
270+
$(foreach target,$(CFG_TARGET), \
271+
$(eval $(call ADD_LLVM_AR_TO_MSVC_DEPS,$(target))))
272+
273+
# When working with MSVC on windows, each DLL needs to explicitly declare its
274+
# interface to the outside world through some means. The options for doing so
275+
# include:
276+
#
277+
# 1. A custom attribute on each function itself
278+
# 2. A linker argument saying what to export
279+
# 3. A file which lists all symbols that need to be exported
280+
#
281+
# The Rust compiler takes care (1) for us for all Rust code by annotating all
282+
# public-facing functions with dllexport, but we have a few native dependencies
283+
# which need to cross the DLL boundary. The most important of these dependencies
284+
# is LLVM which is linked into `rustc_llvm.dll` but primarily used from
285+
# `rustc_trans.dll`. This means that many of LLVM's C API functions need to be
286+
# exposed from `rustc_llvm.dll` to be forwarded over the boundary.
287+
#
288+
# Unfortunately, at this time, LLVM does not handle this sort of exportation on
289+
# Windows for us, so we're forced to do it ourselves if we want it (which seems
290+
# like the path of least resistance right now). To do this we generate a `.DEF`
291+
# file [1] which we then custom-pass to the linker when building the rustc_llvm
292+
# crate. This DEF file list all symbols that are exported from
293+
# `src/librustc_llvm/lib.rs` and is generated by a small python script.
294+
#
295+
# Fun times!
296+
#
297+
# [1]: https://msdn.microsoft.com/en-us/library/28d6s79h.aspx
298+
define ADD_RUSTC_LLVM_DEF_TO_MSVC
299+
ifeq ($$(findstring msvc,$(1)),msvc)
300+
RUSTFLAGS_rustc_llvm_T_$(1) += -C link-args="-DEF:$(1)/rt/rustc_llvm.def"
301+
CUSTOM_DEPS_rustc_llvm_T_$(1) += $(1)/rt/rustc_llvm.def
302+
303+
$(1)/rt/rustc_llvm.def: $$(S)src/etc/mklldef.py $$(S)src/librustc_llvm/lib.rs
304+
$$(CFG_PYTHON) $$^ $$@ rustc_llvm-$$(CFG_FILENAME_EXTRA)
305+
endif
306+
endef
307+
308+
$(foreach target,$(CFG_TARGET), \
309+
$(eval $(call ADD_RUSTC_LLVM_DEF_TO_MSVC,$(target))))

branches/stable/mk/rt.mk

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ NATIVE_DEPS_hoedown_$(1) := hoedown/src/autolink.c \
5353
NATIVE_DEPS_miniz_$(1) = miniz.c
5454
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
5555
rust_android_dummy.c
56-
NATIVE_DEPS_rustrt_native_$(1) := \
57-
rust_try.ll \
58-
arch/$$(HOST_$(1))/record_sp.S
56+
NATIVE_DEPS_rustrt_native_$(1) := arch/$$(HOST_$(1))/record_sp.S
57+
ifeq ($$(findstring msvc,$(1)),msvc)
58+
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_64.ll
59+
else
60+
NATIVE_DEPS_rustrt_native_$(1) += rust_try.ll
61+
endif
5962
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
6063
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
6164

branches/stable/src/liballoc/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ use core::atomic;
7777
use core::atomic::Ordering::{Relaxed, Release, Acquire, SeqCst};
7878
use core::fmt;
7979
use core::cmp::Ordering;
80-
use core::mem::{min_align_of_val, size_of_val};
80+
use core::mem::{align_of_val, size_of_val};
8181
use core::intrinsics::drop_in_place;
8282
use core::mem;
8383
use core::nonzero::NonZero;
@@ -241,7 +241,7 @@ impl<T: ?Sized> Arc<T> {
241241

242242
if self.inner().weak.fetch_sub(1, Release) == 1 {
243243
atomic::fence(Acquire);
244-
deallocate(ptr as *mut u8, size_of_val(&*ptr), min_align_of_val(&*ptr))
244+
deallocate(ptr as *mut u8, size_of_val(&*ptr), align_of_val(&*ptr))
245245
}
246246
}
247247
}
@@ -565,7 +565,7 @@ impl<T: ?Sized> Drop for Weak<T> {
565565
atomic::fence(Acquire);
566566
unsafe { deallocate(ptr as *mut u8,
567567
size_of_val(&*ptr),
568-
min_align_of_val(&*ptr)) }
568+
align_of_val(&*ptr)) }
569569
}
570570
}
571571
}

branches/stable/src/liballoc/boxed.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<T : ?Sized> Box<T> {
116116
/// of `T` and releases memory. Since the way `Box` allocates and
117117
/// releases memory is unspecified, the only valid pointer to pass
118118
/// to this function is the one taken from another `Box` with
119-
/// `boxed::into_raw` function.
119+
/// `Box::into_raw` function.
120120
///
121121
/// Function is unsafe, because improper use of this function may
122122
/// lead to memory problems like double-free, for example if the
@@ -140,10 +140,8 @@ impl<T : ?Sized> Box<T> {
140140
/// # Examples
141141
/// ```
142142
/// # #![feature(box_raw)]
143-
/// use std::boxed;
144-
///
145143
/// let seventeen = Box::new(17u32);
146-
/// let raw = boxed::into_raw(seventeen);
144+
/// let raw = Box::into_raw(seventeen);
147145
/// let boxed_again = unsafe { Box::from_raw(raw) };
148146
/// ```
149147
#[unstable(feature = "box_raw", reason = "may be renamed")]

branches/stable/src/liballoc/boxed_test.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ fn deref() {
7676

7777
#[test]
7878
fn raw_sized() {
79+
let x = Box::new(17);
80+
let p = Box::into_raw(x);
7981
unsafe {
80-
let x = Box::new(17);
81-
let p = boxed::into_raw(x);
8282
assert_eq!(17, *p);
8383
*p = 19;
8484
let y = Box::from_raw(p);
@@ -105,9 +105,9 @@ fn raw_trait() {
105105
}
106106
}
107107

108+
let x: Box<Foo> = Box::new(Bar(17));
109+
let p = Box::into_raw(x);
108110
unsafe {
109-
let x: Box<Foo> = Box::new(Bar(17));
110-
let p = boxed::into_raw(x);
111111
assert_eq!(17, (*p).get());
112112
(*p).set(19);
113113
let y: Box<Foo> = Box::from_raw(p);

branches/stable/src/liballoc/rc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ use core::fmt;
162162
use core::hash::{Hasher, Hash};
163163
use core::intrinsics::{assume, drop_in_place};
164164
use core::marker::{self, Unsize};
165-
use core::mem::{self, min_align_of, size_of, min_align_of_val, size_of_val, forget};
165+
use core::mem::{self, align_of, size_of, align_of_val, size_of_val, forget};
166166
use core::nonzero::NonZero;
167167
use core::ops::{CoerceUnsized, Deref};
168168
use core::ptr;
@@ -246,7 +246,7 @@ impl<T> Rc<T> {
246246
// destruct the box and skip our Drop
247247
// we can ignore the refcounts because we know we're unique
248248
deallocate(*rc._ptr as *mut u8, size_of::<RcBox<T>>(),
249-
min_align_of::<RcBox<T>>());
249+
align_of::<RcBox<T>>());
250250
forget(rc);
251251
Ok(val)
252252
}
@@ -496,7 +496,7 @@ impl<T: ?Sized> Drop for Rc<T> {
496496
if self.weak() == 0 {
497497
deallocate(ptr as *mut u8,
498498
size_of_val(&*ptr),
499-
min_align_of_val(&*ptr))
499+
align_of_val(&*ptr))
500500
}
501501
}
502502
}
@@ -805,7 +805,7 @@ impl<T: ?Sized> Drop for Weak<T> {
805805
// the strong pointers have disappeared.
806806
if self.weak() == 0 {
807807
deallocate(ptr as *mut u8, size_of_val(&*ptr),
808-
min_align_of_val(&*ptr))
808+
align_of_val(&*ptr))
809809
}
810810
}
811811
}

branches/stable/src/libarena/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl<'longer_than_self> Arena<'longer_than_self> {
244244
fn alloc_copy<T, F>(&self, op: F) -> &mut T where F: FnOnce() -> T {
245245
unsafe {
246246
let ptr = self.alloc_copy_inner(mem::size_of::<T>(),
247-
mem::min_align_of::<T>());
247+
mem::align_of::<T>());
248248
let ptr = ptr as *mut T;
249249
ptr::write(&mut (*ptr), op());
250250
return &mut *ptr;
@@ -300,7 +300,7 @@ impl<'longer_than_self> Arena<'longer_than_self> {
300300
let tydesc = get_tydesc::<T>();
301301
let (ty_ptr, ptr) =
302302
self.alloc_noncopy_inner(mem::size_of::<T>(),
303-
mem::min_align_of::<T>());
303+
mem::align_of::<T>());
304304
let ty_ptr = ty_ptr as *mut usize;
305305
let ptr = ptr as *mut T;
306306
// Write in our tydesc along with a bit indicating that it
@@ -393,7 +393,7 @@ struct TypedArenaChunk<T> {
393393

394394
fn calculate_size<T>(capacity: usize) -> usize {
395395
let mut size = mem::size_of::<TypedArenaChunk<T>>();
396-
size = round_up(size, mem::min_align_of::<T>());
396+
size = round_up(size, mem::align_of::<T>());
397397
let elem_size = mem::size_of::<T>();
398398
let elems_size = elem_size.checked_mul(capacity).unwrap();
399399
size = size.checked_add(elems_size).unwrap();
@@ -405,7 +405,7 @@ impl<T> TypedArenaChunk<T> {
405405
unsafe fn new(next: *mut TypedArenaChunk<T>, capacity: usize)
406406
-> *mut TypedArenaChunk<T> {
407407
let size = calculate_size::<T>(capacity);
408-
let chunk = allocate(size, mem::min_align_of::<TypedArenaChunk<T>>())
408+
let chunk = allocate(size, mem::align_of::<TypedArenaChunk<T>>())
409409
as *mut TypedArenaChunk<T>;
410410
if chunk.is_null() { alloc::oom() }
411411
(*chunk).next = next;
@@ -431,7 +431,7 @@ impl<T> TypedArenaChunk<T> {
431431
let size = calculate_size::<T>(self.capacity);
432432
let self_ptr: *mut TypedArenaChunk<T> = self;
433433
deallocate(self_ptr as *mut u8, size,
434-
mem::min_align_of::<TypedArenaChunk<T>>());
434+
mem::align_of::<TypedArenaChunk<T>>());
435435
if !next.is_null() {
436436
let capacity = (*next).capacity;
437437
(*next).destroy(capacity);
@@ -444,7 +444,7 @@ impl<T> TypedArenaChunk<T> {
444444
let this: *const TypedArenaChunk<T> = self;
445445
unsafe {
446446
mem::transmute(round_up(this.offset(1) as usize,
447-
mem::min_align_of::<T>()))
447+
mem::align_of::<T>()))
448448
}
449449
}
450450

0 commit comments

Comments
 (0)