Skip to content

Commit 60f8f32

Browse files
committed
---
yaml --- r: 274399 b: refs/heads/stable c: cf0f7a3 h: refs/heads/master i: 274397: 746de26 274395: c564924 274391: b07d9be 274383: bf058f2 274367: df9dc34
1 parent 66c5eb4 commit 60f8f32

File tree

125 files changed

+6549
-1320
lines changed

Some content is hidden

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

125 files changed

+6549
-1320
lines changed

[refs]

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

branches/stable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and documentation.
99

1010
Read ["Installing Rust"] from [The Book].
1111

12-
["Installing Rust"]: https://doc.rust-lang.org/book/installing-rust.html
12+
["Installing Rust"]: https://doc.rust-lang.org/book/getting-started.html#installing-rust
1313
[The Book]: https://doc.rust-lang.org/book/index.html
1414

1515
## Building from Source

branches/stable/RELEASES.md

Lines changed: 352 additions & 0 deletions
Large diffs are not rendered by default.

branches/stable/configure

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,6 @@ enable_if_not_disabled() {
334334
fi
335335
}
336336

337-
to_llvm_triple() {
338-
case $1 in
339-
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
340-
x86_64-w64-mingw32) echo x86_64-pc-windows-gnu ;;
341-
*) echo $1 ;;
342-
esac
343-
}
344-
345337
to_gnu_triple() {
346338
case $1 in
347339
i686-pc-windows-gnu) echo i686-w64-mingw32 ;;
@@ -646,12 +638,6 @@ valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
646638
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
647639
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
648640

649-
# Temporarily support old triples until buildbots get updated
650-
CFG_BUILD=$(to_llvm_triple $CFG_BUILD)
651-
putvar CFG_BUILD # Yes, this creates a duplicate entry, but the last one wins.
652-
CFG_HOST=$(to_llvm_triple $CFG_HOST)
653-
CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
654-
655641
# On Windows this determines root of the subtree for target libraries.
656642
# Host runtime libs always go to 'bin'.
657643
valopt libdir "${CFG_PREFIX}/lib" "install libraries"
@@ -1409,6 +1395,7 @@ do
14091395
make_dir $h/test/debuginfo-gdb
14101396
make_dir $h/test/debuginfo-lldb
14111397
make_dir $h/test/codegen
1398+
make_dir $h/test/codegen-units
14121399
make_dir $h/test/rustdoc
14131400
done
14141401

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# armv7-unknown-linux-gnueabihf configuration
2+
CROSS_PREFIX_armv7-unknown-linux-gnueabihf=arm-linux-gnueabihf-
3+
CC_armv7-unknown-linux-gnueabihf=gcc
4+
CXX_armv7-unknown-linux-gnueabihf=g++
5+
CPP_armv7-unknown-linux-gnueabihf=gcc -E
6+
AR_armv7-unknown-linux-gnueabihf=ar
7+
CFG_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).so
8+
CFG_STATIC_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).a
9+
CFG_LIB_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.dylib.dSYM
11+
CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS) -march=armv7
12+
CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS) -march=armv7
13+
CFG_GCCISH_CXXFLAGS_armv7-unknown-linux-gnueabihf := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_armv7-unknown-linux-gnueabihf := -shared -fPIC -g
15+
CFG_GCCISH_DEF_FLAG_armv7-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list=
16+
CFG_LLC_FLAGS_armv7-unknown-linux-gnueabihf :=
17+
CFG_INSTALL_NAME_ar,-unknown-linux-gnueabihf =
18+
CFG_EXE_SUFFIX_armv7-unknown-linux-gnueabihf :=
19+
CFG_WINDOWSY_armv7-unknown-linux-gnueabihf :=
20+
CFG_UNIXY_armv7-unknown-linux-gnueabihf := 1
21+
CFG_LDPATH_armv7-unknown-linux-gnueabihf :=
22+
CFG_RUN_armv7-unknown-linux-gnueabihf=$(2)
23+
CFG_RUN_TARG_armv7-unknown-linux-gnueabihf=$(call CFG_RUN_armv7-unknown-linux-gnueabihf,,$(2))
24+
RUSTC_FLAGS_armv7-unknown-linux-gnueabihf := -C target-feature=+v7,+vfp2,+neon
25+
RUSTC_CROSS_FLAGS_armv7-unknown-linux-gnueabihf :=
26+
CFG_GNU_TRIPLE_armv7-unknown-linux-gnueabihf := armv7-unknown-linux-gnueabihf

branches/stable/mk/cfg/armv7s-apple-ios.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ CFG_LIB_GLOB_armv7s-apple-ios = lib$(1)-*.a
1414
CFG_INSTALL_ONLY_RLIB_armv7s-apple-ios = 1
1515
CFG_STATIC_LIB_NAME_armv7s-apple-ios=lib$(1).a
1616
CFG_LIB_DSYM_GLOB_armv7s-apple-ios = lib$(1)-*.a.dSYM
17-
CFG_JEMALLOC_CFLAGS_armv7s-apple-ios := -arch armv7s -mfpu=vfp4 $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios)
18-
CFG_GCCISH_CFLAGS_armv7s-apple-ios := -Wall -Werror -g -fPIC $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -mfpu=vfp4 -arch armv7s
17+
CFG_JEMALLOC_CFLAGS_armv7s-apple-ios := -arch armv7s $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios)
18+
CFG_GCCISH_CFLAGS_armv7s-apple-ios := -Wall -Werror -g -fPIC $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -arch armv7s
1919
CFG_GCCISH_CXXFLAGS_armv7s-apple-ios := -fno-rtti $(CFG_IOS_SDK_FLAGS_armv7s-apple-ios) -I$(CFG_IOS_SDK_armv7s-apple-ios)/usr/include/c++/4.2.1
2020
CFG_GCCISH_LINK_FLAGS_armv7s-apple-ios := -lpthread -syslibroot $(CFG_IOS_SDK_armv7s-apple-ios) -Wl,-no_compact_unwind
2121
CFG_GCCISH_DEF_FLAG_armv7s-apple-ios := -Wl,-exported_symbols_list,

branches/stable/mk/cfg/powerpc64-unknown-linux-gnu.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# powerpc64-unknown-linux-gnu configuration
2-
CROSS_PREFIX_powerpc64-unknown-linux-gnu=powerpc64-linux-gnu-
2+
CROSS_PREFIX_powerpc64-unknown-linux-gnu=powerpc-linux-gnu-
33
CC_powerpc64-unknown-linux-gnu=$(CC)
44
CXX_powerpc64-unknown-linux-gnu=$(CXX)
55
CPP_powerpc64-unknown-linux-gnu=$(CPP)
@@ -8,6 +8,7 @@ CFG_LIB_NAME_powerpc64-unknown-linux-gnu=lib$(1).so
88
CFG_STATIC_LIB_NAME_powerpc64-unknown-linux-gnu=lib$(1).a
99
CFG_LIB_GLOB_powerpc64-unknown-linux-gnu=lib$(1)-*.so
1010
CFG_LIB_DSYM_GLOB_powerpc64-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
11+
CFG_JEMALLOC_CFLAGS_powerpc64-unknown-linux-gnu := -m64
1112
CFG_CFLAGS_powerpc64-unknown-linux-gnu := -m64 $(CFLAGS)
1213
CFG_GCCISH_CFLAGS_powerpc64-unknown-linux-gnu := -Wall -Werror -g -fPIC -m64 $(CFLAGS)
1314
CFG_GCCISH_CXXFLAGS_powerpc64-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)

branches/stable/mk/tests.mk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
310310
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
311311
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
312312
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
313+
check-stage$(1)-T-$(2)-H-$(3)-codegen-units-exec \
313314
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
314315
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
315316

@@ -473,6 +474,7 @@ DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
473474
DEBUGINFO_LLDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
474475
CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
475476
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
477+
CODEGEN_UNITS_RS := $(wildcard $(S)src/test/codegen-units/*.rs)
476478
RUSTDOCCK_RS := $(wildcard $(S)src/test/rustdoc/*.rs)
477479

478480
RPASS_TESTS := $(RPASS_RS)
@@ -488,6 +490,7 @@ PRETTY_TESTS := $(PRETTY_RS)
488490
DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
489491
DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
490492
CODEGEN_TESTS := $(CODEGEN_RS) $(CODEGEN_CC)
493+
CODEGEN_UNITS_TESTS := $(CODEGEN_UNITS_RS)
491494
RUSTDOCCK_TESTS := $(RUSTDOCCK_RS)
492495

493496
CTEST_SRC_BASE_rpass = run-pass
@@ -550,6 +553,11 @@ CTEST_BUILD_BASE_codegen = codegen
550553
CTEST_MODE_codegen = codegen
551554
CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL)
552555

556+
CTEST_SRC_BASE_codegen-units = codegen-units
557+
CTEST_BUILD_BASE_codegen-units = codegen-units
558+
CTEST_MODE_codegen-units = codegen-units
559+
CTEST_RUNTOOL_codegen-units = $(CTEST_RUNTOOL)
560+
553561
CTEST_SRC_BASE_rustdocck = rustdoc
554562
CTEST_BUILD_BASE_rustdocck = rustdoc
555563
CTEST_MODE_rustdocck = rustdoc
@@ -673,6 +681,7 @@ CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
673681
$(S)src/etc/lldb_batchmode.py \
674682
$(S)src/etc/lldb_rust_formatters.py
675683
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
684+
CTEST_DEPS_codegen-units_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_UNITS_TESTS)
676685
CTEST_DEPS_rustdocck_$(1)-T-$(2)-H-$(3) = $$(RUSTDOCCK_TESTS) \
677686
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
678687
$(S)src/etc/htmldocck.py
@@ -739,7 +748,7 @@ endif
739748
endef
740749

741750
CTEST_NAMES = rpass rpass-valgrind rpass-full rfail-full cfail-full rfail cfail pfail \
742-
bench debuginfo-gdb debuginfo-lldb codegen rustdocck
751+
bench debuginfo-gdb debuginfo-lldb codegen codegen-units rustdocck
743752

744753
$(foreach host,$(CFG_HOST), \
745754
$(eval $(foreach target,$(CFG_TARGET), \
@@ -917,6 +926,7 @@ TEST_GROUPS = \
917926
debuginfo-gdb \
918927
debuginfo-lldb \
919928
codegen \
929+
codegen-units \
920930
doc \
921931
$(foreach docname,$(DOC_NAMES),doc-$(docname)) \
922932
pretty \
@@ -1029,6 +1039,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10291039
export INCLUDE := $$(CFG_MSVC_INCLUDE_PATH_$$(HOST_$(3)))
10301040
$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10311041
export LIB := $$(CFG_MSVC_LIB_PATH_$$(HOST_$(3)))
1042+
$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
1043+
export MSVC_LIB := "$$(CFG_MSVC_LIB_$$(HOST_$(3)))"
10321044
$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10331045
$(S)src/test/run-make/%/Makefile \
10341046
$$(CSREQ$(1)_T_$(2)_H_$(3))

branches/stable/src/compiletest/common.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub enum Mode {
2525
DebugInfoLldb,
2626
Codegen,
2727
Rustdoc,
28+
CodegenUnits
2829
}
2930

3031
impl FromStr for Mode {
@@ -41,6 +42,7 @@ impl FromStr for Mode {
4142
"debuginfo-gdb" => Ok(DebugInfoGdb),
4243
"codegen" => Ok(Codegen),
4344
"rustdoc" => Ok(Rustdoc),
45+
"codegen-units" => Ok(CodegenUnits),
4446
_ => Err(()),
4547
}
4648
}
@@ -59,6 +61,7 @@ impl fmt::Display for Mode {
5961
DebugInfoLldb => "debuginfo-lldb",
6062
Codegen => "codegen",
6163
Rustdoc => "rustdoc",
64+
CodegenUnits => "codegen-units",
6265
}, f)
6366
}
6467
}

branches/stable/src/compiletest/runtest.rs

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010

1111
use common::Config;
1212
use common::{CompileFail, ParseFail, Pretty, RunFail, RunPass, RunPassValgrind};
13-
use common::{Codegen, DebugInfoLldb, DebugInfoGdb, Rustdoc};
13+
use common::{Codegen, DebugInfoLldb, DebugInfoGdb, Rustdoc, CodegenUnits};
1414
use errors;
1515
use header::TestProps;
1616
use header;
1717
use procsrv;
1818
use util::logv;
1919

2020
use std::env;
21+
use std::collections::HashSet;
2122
use std::fmt;
2223
use std::fs::{self, File};
2324
use std::io::BufReader;
@@ -56,6 +57,7 @@ pub fn run(config: Config, testfile: &Path) {
5657
DebugInfoLldb => run_debuginfo_lldb_test(&config, &props, &testfile),
5758
Codegen => run_codegen_test(&config, &props, &testfile),
5859
Rustdoc => run_rustdoc_test(&config, &props, &testfile),
60+
CodegenUnits => run_codegen_units_test(&config, &props, &testfile),
5961
}
6062
}
6163

@@ -1747,3 +1749,44 @@ fn run_rustdoc_test(config: &Config, props: &TestProps, testfile: &Path) {
17471749
fatal_proc_rec("htmldocck failed!", &res);
17481750
}
17491751
}
1752+
1753+
fn run_codegen_units_test(config: &Config, props: &TestProps, testfile: &Path) {
1754+
let proc_res = compile_test(config, props, testfile);
1755+
1756+
if !proc_res.status.success() {
1757+
fatal_proc_rec("compilation failed!", &proc_res);
1758+
}
1759+
1760+
check_no_compiler_crash(&proc_res);
1761+
1762+
let prefix = "TRANS_ITEM ";
1763+
1764+
let actual: HashSet<String> = proc_res
1765+
.stdout
1766+
.lines()
1767+
.filter(|line| line.starts_with(prefix))
1768+
.map(|s| (&s[prefix.len()..]).to_string())
1769+
.collect();
1770+
1771+
let expected: HashSet<String> = errors::load_errors(testfile)
1772+
.iter()
1773+
.map(|e| e.msg.trim().to_string())
1774+
.collect();
1775+
1776+
if actual != expected {
1777+
let mut missing: Vec<_> = expected.difference(&actual).collect();
1778+
missing.sort();
1779+
1780+
let mut too_much: Vec<_> = actual.difference(&expected).collect();
1781+
too_much.sort();
1782+
1783+
println!("Expected and actual sets of codegen-items differ.\n\
1784+
These items should have been contained but were not:\n\n\
1785+
{}\n\n\
1786+
These items were contained but should not have been:\n\n\
1787+
{}\n\n",
1788+
missing.iter().fold("".to_string(), |s1, s2| s1 + "\n" + s2),
1789+
too_much.iter().fold("".to_string(), |s1, s2| s1 + "\n" + s2));
1790+
panic!();
1791+
}
1792+
}

branches/stable/src/doc/book/guessing-game.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ displaying the message.
279279
[expect]: ../std/option/enum.Option.html#method.expect
280280
[panic]: error-handling.html
281281

282-
If we leave off calling these two methods, our program will compile, but
282+
If we leave off calling this method, our program will compile, but
283283
we’ll get a warning:
284284

285285
```bash
@@ -680,7 +680,7 @@ fn main() {
680680
}
681681
```
682682
683-
The new three lines:
683+
The new two lines:
684684
685685
```rust,ignore
686686
let guess: u32 = guess.trim().parse()

branches/stable/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ comments (`/** ... */`), are interpreted as a special syntax for `doc`
104104
`#[doc="..."]` around the body of the comment, i.e., `/// Foo` turns into
105105
`#[doc="Foo"]`.
106106

107-
Line comments beginning with `//!` and block comments `/*! ... !*/` are
107+
Line comments beginning with `//!` and block comments `/*! ... */` are
108108
doc comments that apply to the parent of the comment, rather than the item
109109
that follows. That is, they are equivalent to writing `#![doc="..."]` around
110110
the body of the comment. `//!` comments are usually used to document

branches/stable/src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ impl String {
641641
Cow::Owned(res)
642642
}
643643

644-
/// Decode a UTF-16 encoded vector `v` into a `String`, returning `None`
644+
/// Decode a UTF-16 encoded vector `v` into a `String`, returning `Err`
645645
/// if `v` contains any invalid data.
646646
///
647647
/// # Examples

branches/stable/src/libcore/intrinsics.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,15 @@ extern "rust-intrinsic" {
552552
pub fn discriminant_value<T>(v: &T) -> u64;
553553

554554
/// Rust's "try catch" construct which invokes the function pointer `f` with
555-
/// the data pointer `data`, returning the exception payload if an exception
556-
/// is thrown (aka the thread panics).
555+
/// the data pointer `data`.
556+
///
557+
/// The third pointer is a target-specific data pointer which is filled in
558+
/// with the specifics of the exception that occurred. For examples on Unix
559+
/// platforms this is a `*mut *mut T` which is filled in by the compiler and
560+
/// on MSVC it's `*mut [usize; 2]`. For more information see the compiler's
561+
/// source as well as std's catch implementation.
562+
#[cfg(not(stage0))]
563+
pub fn try(f: fn(*mut u8), data: *mut u8, local_ptr: *mut u8) -> i32;
564+
#[cfg(stage0)]
557565
pub fn try(f: fn(*mut u8), data: *mut u8) -> *mut u8;
558566
}

branches/stable/src/liblibc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit af77843345ec6fc7e51113bfd692138d89024bc0
1+
Subproject commit 91ff43c736de664f8d3cd351e148c09cdea6731e

0 commit comments

Comments
 (0)