Skip to content

Commit 10f4cb1

Browse files
committed
---
yaml --- r: 271883 b: refs/heads/master c: 4ddbd6b h: refs/heads/master i: 271881: 0649ab9 271879: ce60f93
1 parent afacef4 commit 10f4cb1

File tree

315 files changed

+2143
-2781
lines changed

Some content is hidden

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

315 files changed

+2143
-2781
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e1195c24bb567019d7cdc65bf5a4c642e38475d1
2+
refs/heads/master: 4ddbd6b5b0f356eae0ec4ba5fcea277885da7528
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/COMPILER_TESTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn test_foo() {
7777
}
7878
```
7979

80-
Note that not all headers have meaning when customized to a revision.
80+
Note that not all headers have meaning when customized too a revision.
8181
For example, the `ignore-test` header (and all "ignore" headers)
8282
currently only apply to the test as a whole, not to particular
8383
revisions. The only headers that are intended to really work when

trunk/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ Some common make targets are:
132132
- `make check-stage1-std NO_REBUILD=1` - test the standard library without
133133
rebuilding the entire compiler
134134
- `make check TESTNAME=<substring-of-test-name>` - Run a matching set of tests.
135-
- `TESTNAME` should be a substring of the tests to match against e.g. it could
136-
be the fully qualified test name, or just a part of it.
135+
- `TESTNAME` should be a substring of the tests to match against e.g. it could
136+
be the fully qualified test name, or just a part of it.
137137
`TESTNAME=collections::hash::map::test_map::test_capacity_not_less_than_len`
138138
or `TESTNAME=test_capacity_not_less_than_len`.
139139
- `make check-stage1-rpass TESTNAME=<substring-of-test-name>` - Run a single

trunk/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
12521252
bits=x86_64
12531253
msvc_part=amd64
12541254
;;
1255-
i*86-*)
1255+
i686-*)
12561256
bits=i386
12571257
msvc_part=
12581258
;;

trunk/mk/crates.mk

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ TARGET_CRATES := libc std term \
5353
getopts collections test rand \
5454
core alloc \
5555
rustc_unicode rustc_bitflags \
56-
alloc_system alloc_jemalloc
56+
alloc_system alloc_jemalloc rustc_const_eval
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
60-
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
61-
rustc_const_eval rustc_const_math
60+
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis
6261
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6362
flate arena graphviz rbml log serialize
6463
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -92,39 +91,36 @@ DEPS_test := std getopts term native:rust_test_helpers
9291
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9392
DEPS_syntax_ext := syntax fmt_macros
9493

95-
DEPS_rustc_const_math := std syntax log serialize
96-
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
97-
rustc_back graphviz
94+
DEPS_rustc_const_eval := std syntax
9895

9996
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
100-
log graphviz rustc_back rustc_data_structures\
101-
rustc_const_math
102-
DEPS_rustc_back := std syntax rustc_front flate log libc
97+
log graphviz rustc_llvm rustc_back rustc_data_structures\
98+
rustc_const_eval
99+
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
103100
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
104101
DEPS_rustc_data_structures := std log serialize
105102
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
106103
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
107104
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
108-
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
105+
rustc_metadata syntax_ext rustc_passes rustc_save_analysis
109106
DEPS_rustc_front := std syntax log serialize
110-
DEPS_rustc_lint := rustc log syntax rustc_const_eval
107+
DEPS_rustc_lint := rustc log syntax
111108
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
112-
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
113-
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
114-
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
109+
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_eval
110+
DEPS_rustc_passes := syntax rustc core rustc_front
111+
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_eval
115112
DEPS_rustc_resolve := arena rustc rustc_front log syntax
116-
DEPS_rustc_platform_intrinsics := std
113+
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
117114
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
118115
DEPS_rustc_privacy := rustc rustc_front log syntax
119116
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
120117
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
121-
rustc_const_math rustc_const_eval
118+
rustc_const_eval
122119
DEPS_rustc_save_analysis := rustc log syntax rustc_front
123-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
124-
rustc_const_eval
120+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
125121

126122
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
127-
test rustc_lint rustc_front rustc_const_eval
123+
test rustc_lint rustc_front
128124

129125

130126
TOOL_DEPS_compiletest := test getopts log

trunk/mk/main.mk

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ endif
493493
LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3) := \
494494
$$(CURDIR)/$$(HLIB$(1)_H_$(3)):$$(CFG_LLVM_INST_DIR_$(3))/lib
495495
LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3) := \
496-
$$(CURDIR)/$$(TLIB$(1)_T_$(2)_H_$(3))
496+
$$(CURDIR)/$$(TLIB$(1)_T_$(2)_H_$(CFG_BUILD))
497497

498498
HOST_RPATH_VAR$(1)_T_$(2)_H_$(3) := \
499499
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3)):$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))
@@ -506,14 +506,18 @@ RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(HOST_RPATH_VAR$(1)_T_$(2)_H_$(3))
506506
# if you're building a cross config, the host->* parts are
507507
# effectively stage1, since it uses the just-built stage0.
508508
#
509-
# Also be sure to use the right rpath because we're loading libraries from the
510-
# CFG_BUILD's stage1 directory for our target, so switch this one instance of
511-
# `RPATH_VAR` to get the bootstrap working.
509+
# This logic is similar to how the LD_LIBRARY_PATH variable must
510+
# change be slightly different when doing cross compilations.
511+
# The build doesn't copy over all target libraries into
512+
# a new directory, so we need to point the library path at
513+
# the build directory where all the target libraries came
514+
# from (the stage0 build host). Otherwise the relative rpaths
515+
# inside of the rustc binary won't get resolved correctly.
512516
ifeq ($(1),0)
513517
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
514518
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
515519

516-
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR1_T_$(2)_H_$$(CFG_BUILD))
520+
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR$(1)_T_$(2)_H_$(3))
517521
endif
518522
endif
519523

trunk/mk/rt.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
236236
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
237237

238238
ifeq ($$(findstring msvc,$(1)),msvc)
239-
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD))
239+
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1))
240240
@$$(call E, cmake: compiler-rt)
241241
$$(Q)cd "$$(COMPRT_BUILD_DIR_$(1))"; $$(CFG_CMAKE) "$(S)src/compiler-rt" \
242242
-DCMAKE_BUILD_TYPE=$$(LLVM_BUILD_CONFIG_MODE) \
243-
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$$(CFG_BUILD)) \
243+
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$(1)) \
244244
-G"$$(CFG_CMAKE_GENERATOR)"
245245
$$(Q)$$(CFG_CMAKE) --build "$$(COMPRT_BUILD_DIR_$(1))" \
246246
--target lib/builtins/builtins \

trunk/mk/target.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8989
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
9090
--out-dir $$(@D) \
9191
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
92-
-C metadata=$$(CFG_FILENAME_EXTRA) \
9392
$$<
9493
@touch -r $$@.start_time $$@ && rm $$@.start_time
9594
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

trunk/src/compiletest/runtest.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -727,11 +727,8 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testpaths: &TestP
727727
script_str.push_str("type category enable Rust\n");
728728

729729
// Set breakpoints on every line that contains the string "#break"
730-
let source_file_name = testpaths.file.file_name().unwrap().to_string_lossy();
731730
for line in &breakpoint_lines {
732-
script_str.push_str(&format!("breakpoint set --file '{}' --line {}\n",
733-
source_file_name,
734-
line));
731+
script_str.push_str(&format!("breakpoint set --line {}\n", line));
735732
}
736733

737734
// Append the other commands

trunk/src/doc/book/associated-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ declarations.
131131
## Trait objects with associated types
132132

133133
There’s one more bit of syntax we should talk about: trait objects. If you
134-
try to create a trait object from a trait with an associated type, like this:
134+
try to create a trait object from an associated type, like this:
135135

136136
```rust,ignore
137137
# trait Graph {

trunk/src/doc/book/casting-between-types.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ function result.
1717
The most common case of coercion is removing mutability from a reference:
1818

1919
* `&mut T` to `&T`
20-
20+
2121
An analogous conversion is to remove mutability from a
2222
[raw pointer](raw-pointers.md):
2323

2424
* `*mut T` to `*const T`
25-
25+
2626
References can also be coerced to raw pointers:
2727

2828
* `&T` to `*const T`
@@ -32,7 +32,7 @@ References can also be coerced to raw pointers:
3232
Custom coercions may be defined using [`Deref`](deref-coercions.md).
3333

3434
Coercion is transitive.
35-
35+
3636
# `as`
3737

3838
The `as` keyword does safe casting:
@@ -64,7 +64,7 @@ A cast `e as U` is also valid in any of the following cases:
6464
and `U` is an integer type; *enum-cast*
6565
* `e` has type `bool` or `char` and `U` is an integer type; *prim-int-cast*
6666
* `e` has type `u8` and `U` is `char`; *u8-char-cast*
67-
67+
6868
For example
6969

7070
```rust
@@ -98,9 +98,9 @@ The semantics of numeric casts are:
9898

9999
[float-int]: https://github.com/rust-lang/rust/issues/10184
100100
[float-float]: https://github.com/rust-lang/rust/issues/15536
101-
101+
102102
## Pointer casts
103-
103+
104104
Perhaps surprisingly, it is safe to cast [raw pointers](raw-pointers.md) to and
105105
from integers, and to cast between pointers to different types subject to
106106
some constraints. It is only unsafe to dereference the pointer:
@@ -114,7 +114,7 @@ let b = a as u32;
114114

115115
* `e` has type `*T`, `U` has type `*U_0`, and either `U_0: Sized` or
116116
`unsize_kind(T) == unsize_kind(U_0)`; a *ptr-ptr-cast*
117-
117+
118118
* `e` has type `*T` and `U` is a numeric type, while `T: Sized`; *ptr-addr-cast*
119119

120120
* `e` is an integer and `U` is `*U_0`, while `U_0: Sized`; *addr-ptr-cast*

trunk/src/doc/book/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,5 +502,5 @@ assert_eq!(6, answer);
502502
```
503503

504504
By making the inner closure a `move Fn`, we create a new stack frame for our
505-
closure. By `Box`ing it up, we’ve given it a known size, allowing it to
505+
closure. By `Box`ing it up, we’ve given it a known size, and allowing it to
506506
escape our stack frame.

trunk/src/doc/book/concurrency.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ fn main() {
271271
}
272272
```
273273

274-
Similarly to last time, we use `clone()` to create a new owned handle.
274+
Similarly to las time, we use `clone()` to create a new owned handle.
275275
This handle is then moved into the new thread.
276276

277277
And... still gives us an error.
@@ -282,7 +282,7 @@ And... still gives us an error.
282282
^~~~
283283
```
284284

285-
`Arc<T>` by default has immutable contents. It allows the _sharing_ of data
285+
`Arc<T> by default has immutable contents. It allows the _sharing_ of data
286286
between threads, but shared mutable data is unsafe and when threads are
287287
involved can cause data races!
288288

trunk/src/doc/book/const-and-static.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ a [`Drop`][drop] implementation.
7272
# Initializing
7373

7474
Both `const` and `static` have requirements for giving them a value. They must
75-
be given a value that’s a constant expression. In other words, you cannot use
75+
be given a value that’s a constant expression. In other words, you cannot use
7676
the result of a function call or anything similarly complex or at runtime.
7777

7878
# Which construct should I use?

trunk/src/doc/book/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ first. This leaves the top-level project directory (in this case,
417417
to your code. In this way, using Cargo helps you keep your projects nice and
418418
tidy. There's a place for everything, and everything is in its place.
419419

420-
Now, move *main.rs* into the *src* directory, and delete the compiled file you
420+
Now, copy *main.rs* to the *src* directory, and delete the compiled file you
421421
created with `rustc`. As usual, replace `main` with `main.exe` if you're on
422422
Windows.
423423

trunk/src/doc/book/macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ fn main() {
337337
}
338338
```
339339

340-
Instead you need to pass the variable name into the invocation, so that it’s
341-
tagged with the right syntax context.
340+
Instead you need to pass the variable name into the invocation, so it’s tagged
341+
with the right syntax context.
342342

343343
```rust
344344
macro_rules! foo {
@@ -470,7 +470,7 @@ which syntactic form it matches.
470470
* `ty`: a type. Examples: `i32`; `Vec<(char, String)>`; `&T`.
471471
* `pat`: a pattern. Examples: `Some(t)`; `(17, 'a')`; `_`.
472472
* `stmt`: a single statement. Example: `let x = 3`.
473-
* `block`: a brace-delimited sequence of statements and optionally an expression. Example:
473+
* `block`: a brace-delimited sequence of statements. Example:
474474
`{ log(error, "hi"); return 12; }`.
475475
* `item`: an [item][item]. Examples: `fn foo() { }`; `struct Bar;`.
476476
* `meta`: a "meta item", as found in attributes. Example: `cfg(target_os = "windows")`.

trunk/src/doc/book/match.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ patterns][patterns] that covers all the patterns that are possible here.
2828

2929
[patterns]: patterns.html
3030

31-
One of the many advantages of `match` is it enforces ‘exhaustiveness checking’.
32-
For example if we remove the last arm with the underscore `_`, the compiler will
31+
One of the many advantages of `match` is it enforces ‘exhaustiveness checking’.
32+
For example if we remove the last arm with the underscore `_`, the compiler will
3333
give us an error:
3434

3535
```text
@@ -58,7 +58,7 @@ let number = match x {
5858
};
5959
```
6060

61-
Sometimes it’s a nice way of converting something from one type to another; in
61+
Sometimes it’s a nice way of converting something from one type to another; in
6262
this example the integers are converted to `String`.
6363

6464
# Matching on enums
@@ -90,7 +90,7 @@ fn process_message(msg: Message) {
9090

9191
Again, the Rust compiler checks exhaustiveness, so it demands that you
9292
have a match arm for every variant of the enum. If you leave one off, it
93-
will give you a compile-time error unless you use `_` or provide all possible
93+
will give you a compile-time error unless you use `_` or provide all possible
9494
arms.
9595

9696
Unlike the previous uses of `match`, you can’t use the normal `if`

trunk/src/doc/book/no-stdlib.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize {
3838
// for a bare-bones hello world. These are normally
3939
// provided by libstd.
4040
#[lang = "eh_personality"] extern fn eh_personality() {}
41-
#[lang = "panic_fmt"] extern fn panic_fmt() -> ! { loop {} }
41+
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
4242
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
4343
# #[no_mangle] pub extern fn rust_eh_register_frames () {}
4444
# #[no_mangle] pub extern fn rust_eh_unregister_frames () {}
@@ -65,7 +65,7 @@ pub extern fn main(argc: i32, argv: *const *const u8) -> i32 {
6565
}
6666

6767
#[lang = "eh_personality"] extern fn eh_personality() {}
68-
#[lang = "panic_fmt"] extern fn panic_fmt() -> ! { loop {} }
68+
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
6969
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
7070
# #[no_mangle] pub extern fn rust_eh_register_frames () {}
7171
# #[no_mangle] pub extern fn rust_eh_unregister_frames () {}

trunk/src/doc/book/ownership.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ special annotation here, it’s the default thing that Rust does.
124124
## The details
125125

126126
The reason that we cannot use a binding after we’ve moved it is subtle, but
127-
important.
127+
important.
128128

129129
When we write code like this:
130130

@@ -148,7 +148,7 @@ The first line allocates memory for the vector object `v` on the stack like
148148
it does for `x` above. But in addition to that it also allocates some memory
149149
on the [heap][sh] for the actual data (`[1, 2, 3]`). Rust copies the address
150150
of this heap allocation to an internal pointer, which is part of the vector
151-
object placed on the stack (let's call it the data pointer).
151+
object placed on the stack (let's call it the data pointer).
152152

153153
It is worth pointing out (even at the risk of stating the obvious) that the
154154
vector object and its data live in separate memory regions instead of being a
@@ -163,7 +163,7 @@ does not create a copy of the heap allocation containing the actual data.
163163
Which means that there would be two pointers to the contents of the vector
164164
both pointing to the same memory allocation on the heap. It would violate
165165
Rust’s safety guarantees by introducing a data race if one could access both
166-
`v` and `v2` at the same time.
166+
`v` and `v2` at the same time.
167167

168168
For example if we truncated the vector to just two elements through `v2`:
169169

trunk/src/doc/book/primitive-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ copying. For example, you might want to reference only one line of a file read
164164
into memory. By nature, a slice is not created directly, but from an existing
165165
variable binding. Slices have a defined length, can be mutable or immutable.
166166

167-
Internally, slices are represented as a pointer to the beginning of the data
167+
Internally, slices are represented as a pointer to the beginning of the data
168168
and a length.
169169

170170
## Slicing syntax

0 commit comments

Comments
 (0)