Skip to content

Commit 123d08b

Browse files
committed
Merge branch 'master' of https://github.com/rust-lang/rust into redox
2 parents c77979b + 074d30d commit 123d08b

File tree

237 files changed

+2128
-2584
lines changed

Some content is hidden

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

237 files changed

+2128
-2584
lines changed

mk/cfg/aarch64-unknown-fuchsia.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# rustbuild-only target

mk/crates.mk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_
6060
rustc_data_structures rustc_platform_intrinsics rustc_errors \
6161
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
6262
rustc_const_eval rustc_const_math rustc_incremental proc_macro
63-
HOST_CRATES := syntax syntax_ext proc_macro_plugin syntax_pos $(RUSTC_CRATES) rustdoc fmt_macros \
64-
flate arena graphviz log serialize
63+
HOST_CRATES := syntax syntax_ext proc_macro_tokens proc_macro_plugin syntax_pos $(RUSTC_CRATES) \
64+
rustdoc fmt_macros flate arena graphviz log serialize
6565
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
6666

6767
DEPS_core :=
@@ -102,8 +102,9 @@ DEPS_test := std getopts term native:rust_test_helpers
102102

103103
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode rustc_errors syntax_pos
104104
DEPS_syntax_ext := syntax syntax_pos rustc_errors fmt_macros proc_macro
105-
DEPS_proc_macro_plugin := syntax syntax_pos rustc_plugin log
106105
DEPS_syntax_pos := serialize
106+
DEPS_proc_macro_tokens := syntax syntax_pos log
107+
DEPS_proc_macro_plugin := syntax syntax_pos rustc_plugin log proc_macro_tokens
107108

108109
DEPS_rustc_const_math := std syntax log serialize
109110
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \
@@ -120,7 +121,7 @@ DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_bo
120121
rustc_trans rustc_privacy rustc_lint rustc_plugin \
121122
rustc_metadata syntax_ext proc_macro_plugin \
122123
rustc_passes rustc_save_analysis rustc_const_eval \
123-
rustc_incremental syntax_pos rustc_errors proc_macro
124+
rustc_incremental syntax_pos rustc_errors proc_macro rustc_data_structures
124125
DEPS_rustc_errors := log libc serialize syntax_pos
125126
DEPS_rustc_lint := rustc log syntax syntax_pos rustc_const_eval
126127
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags

src/Cargo.lock

Lines changed: 37 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/doc/reference.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4023,9 +4023,9 @@ Methods that take either `self` or `Box<Self>` can optionally place them in a
40234023
mutable variable by prefixing them with `mut` (similar to regular arguments):
40244024

40254025
```
4026-
trait Changer {
4027-
fn change(mut self) -> Self;
4028-
fn modify(mut self: Box<Self>) -> Box<Self>;
4026+
trait Changer: Sized {
4027+
fn change(mut self) {}
4028+
fn modify(mut self: Box<Self>) {}
40294029
}
40304030
```
40314031

@@ -4078,6 +4078,12 @@ be ignored in favor of only building the artifacts specified by command line.
40784078
Rust code into an existing non-Rust application because it will not have
40794079
dynamic dependencies on other Rust code.
40804080

4081+
* `--crate-type=cdylib`, `#[crate_type = "cdylib"]` - A dynamic system
4082+
library will be produced. This is used when compiling Rust code as
4083+
a dynamic library to be loaded from another language. This output type will
4084+
create `*.so` files on Linux, `*.dylib` files on OSX, and `*.dll` files on
4085+
Windows.
4086+
40814087
* `--crate-type=rlib`, `#[crate_type = "rlib"]` - A "Rust library" file will be
40824088
produced. This is used as an intermediate artifact and can be thought of as a
40834089
"static Rust library". These `rlib` files, unlike `staticlib` files, are

src/liballoc_system/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ mod imp {
166166
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
167167
fn HeapReAlloc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID, dwBytes: SIZE_T) -> LPVOID;
168168
fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
169+
fn GetLastError() -> DWORD;
169170
}
170171

171172
#[repr(C)]
@@ -230,11 +231,11 @@ mod imp {
230231
pub unsafe fn deallocate(ptr: *mut u8, _old_size: usize, align: usize) {
231232
if align <= MIN_ALIGN {
232233
let err = HeapFree(GetProcessHeap(), 0, ptr as LPVOID);
233-
debug_assert!(err != 0);
234+
debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());
234235
} else {
235236
let header = get_header(ptr);
236237
let err = HeapFree(GetProcessHeap(), 0, header.0 as LPVOID);
237-
debug_assert!(err != 0);
238+
debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());
238239
}
239240
}
240241

src/libcollectionstest/binary_heap.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,5 +299,7 @@ fn test_extend_specialization() {
299299

300300
#[allow(dead_code)]
301301
fn assert_covariance() {
302-
fn drain<'new>(d: Drain<'static, &'static str>) -> Drain<'new, &'new str> { d }
302+
fn drain<'new>(d: Drain<'static, &'static str>) -> Drain<'new, &'new str> {
303+
d
304+
}
303305
}

src/libcollectionstest/btree/map.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,7 @@ create_append_test!(test_append_1700, 1700);
533533

534534
fn rand_data(len: usize) -> Vec<(u32, u32)> {
535535
let mut rng = DeterministicRng::new();
536-
Vec::from_iter(
537-
(0..len).map(|_| (rng.next(), rng.next()))
538-
)
536+
Vec::from_iter((0..len).map(|_| (rng.next(), rng.next())))
539537
}
540538

541539
#[test]

src/libcollectionstest/btree/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl DeterministicRng {
2525
x: 0x193a6754,
2626
y: 0xa8a7d469,
2727
z: 0x97830e05,
28-
w: 0x113ba7bb
28+
w: 0x113ba7bb,
2929
}
3030
}
3131

0 commit comments

Comments
 (0)