Skip to content

Commit e82dffe

Browse files
committed
---
yaml --- r: 276695 b: refs/heads/try c: 2646663 h: refs/heads/master i: 276693: 241b1cd 276691: 888d47e 276687: 70e3fc6
1 parent cde6033 commit e82dffe

File tree

474 files changed

+4651
-8258
lines changed

Some content is hidden

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

474 files changed

+4651
-8258
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: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 9957081e78643aafab55f35c96d7c08936521dea
4+
refs/heads/try: 2646663b5a9b9bd021e58eb9cd8bcc63b7925c95
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/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

branches/try/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

branches/try/configure

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,11 @@ then
969969
LLVM_VERSION=$($LLVM_CONFIG --version)
970970

971971
case $LLVM_VERSION in
972-
(3.[6-8]*)
972+
(3.[5-8]*)
973973
msg "found ok version of LLVM: $LLVM_VERSION"
974974
;;
975975
(*)
976-
err "bad LLVM version: $LLVM_VERSION, need >=3.6"
976+
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
977977
;;
978978
esac
979979
fi
@@ -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
;;

branches/try/mk/crates.mk

Lines changed: 16 additions & 21 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
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,42 +91,38 @@ 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
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
122-
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
118+
rustc_const_eval
119+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
125120

126121
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
127-
test rustc_lint rustc_front rustc_const_eval
122+
test rustc_lint rustc_front
128123

129124

130-
TOOL_DEPS_compiletest := test getopts log
125+
TOOL_DEPS_compiletest := test getopts
131126
TOOL_DEPS_rustdoc := rustdoc
132127
TOOL_DEPS_rustc := rustc_driver
133128
TOOL_DEPS_rustbook := std rustdoc

branches/try/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)/$$(TLIB1_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

branches/try/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 \

branches/try/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, \

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
383383
@$$(call E, rustc: $$@)
384384
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
385385
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
386-
-Cmetadata="test-crate" -L "$$(RT_OUTPUT_DIR_$(2))" \
386+
-L "$$(RT_OUTPUT_DIR_$(2))" \
387387
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
388388
$$(RUSTFLAGS_$(4))
389389

branches/try/src/bootstrap/build/native.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ pub fn llvm(build: &Build, target: &str) {
3939

4040
let _ = fs::remove_dir_all(&dst.join("build"));
4141
t!(fs::create_dir_all(&dst.join("build")));
42-
let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
42+
let mut assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
43+
44+
// Disable LLVM assertions on ARM compilers until #32360 is fixed
45+
if target.contains("arm") && target.contains("gnu") {
46+
assertions = "OFF";
47+
}
4348

4449
// http://llvm.org/docs/CMake.html
4550
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));

branches/try/src/bootstrap/mk/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ standalone-docs:
3838
$(Q)$(BOOTSTRAP) --step doc-standalone
3939
check:
4040
$(Q)$(BOOTSTRAP) --step check
41-
check-cargotest:
42-
$(Q)$(BOOTSTRAP) --step check-cargotest
41+
cargotest:
42+
$(Q)$(BOOTSTRAP) --step cargotest
4343
dist:
4444
$(Q)$(BOOTSTRAP) --step dist
4545

branches/try/src/compiletest/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ impl fmt::Display for Mode {
6969
#[derive(Clone)]
7070
pub struct Config {
7171
// The library paths required for running the compiler
72-
pub compile_lib_path: PathBuf,
72+
pub compile_lib_path: String,
7373

7474
// The library paths required for running compiled programs
75-
pub run_lib_path: PathBuf,
75+
pub run_lib_path: String,
7676

7777
// The rustc executable
7878
pub rustc_path: PathBuf,

branches/try/src/compiletest/compiletest.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
118118
}
119119
}
120120

121-
fn make_absolute(path: PathBuf) -> PathBuf {
122-
if path.is_relative() {
123-
env::current_dir().unwrap().join(path)
124-
} else {
125-
path
126-
}
127-
}
128-
129121
Config {
130-
compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
131-
run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
122+
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
123+
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
132124
rustc_path: opt_path(matches, "rustc-path"),
133125
rustdoc_path: opt_path(matches, "rustdoc-path"),
134126
python: matches.opt_str("python").unwrap(),

branches/try/src/compiletest/runtest.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn run_pretty_test_revision(config: &Config,
316316
testpaths,
317317
pretty_type.to_owned()),
318318
props.exec_env.clone(),
319-
config.compile_lib_path.to_str().unwrap(),
319+
&config.compile_lib_path,
320320
Some(aux_dir.to_str().unwrap()),
321321
Some(src))
322322
}
@@ -635,7 +635,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testpaths: &TestPa
635635
testpaths,
636636
proc_args,
637637
environment,
638-
config.run_lib_path.to_str().unwrap(),
638+
&config.run_lib_path,
639639
None,
640640
None);
641641
}
@@ -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
@@ -1318,7 +1315,7 @@ fn exec_compiled_test(config: &Config, props: &TestProps,
13181315
testpaths,
13191316
make_run_args(config, props, testpaths),
13201317
env,
1321-
config.run_lib_path.to_str().unwrap(),
1318+
&config.run_lib_path,
13221319
Some(aux_dir.to_str().unwrap()),
13231320
None)
13241321
}
@@ -1390,7 +1387,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
13901387
&aux_testpaths,
13911388
aux_args,
13921389
Vec::new(),
1393-
config.compile_lib_path.to_str().unwrap(),
1390+
&config.compile_lib_path,
13941391
Some(aux_dir.to_str().unwrap()),
13951392
None);
13961393
if !auxres.status.success() {
@@ -1413,7 +1410,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
14131410
testpaths,
14141411
args,
14151412
props.rustc_env.clone(),
1416-
config.compile_lib_path.to_str().unwrap(),
1413+
&config.compile_lib_path,
14171414
Some(aux_dir.to_str().unwrap()),
14181415
input)
14191416
}

branches/try/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*

branches/try/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.

0 commit comments

Comments
 (0)