Skip to content

Commit 455a87c

Browse files
committed
---
yaml --- r: 235959 b: refs/heads/stable c: 95c7f30 h: refs/heads/master i: 235957: d4e7c67 235955: 30d5c85 235951: f39f84c v: v3
1 parent 495eadc commit 455a87c

File tree

210 files changed

+8221
-4061
lines changed

Some content is hidden

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

210 files changed

+8221
-4061
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: e6ed27bc24852a9facbf87eb20f9462d88c70bbf
32+
refs/heads/stable: 95c7f306c7c57f028d7e577ef13a5fc66f3086eb
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
*.rs rust
77
src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
9+
src/rt/msvc/* -whitespace
10+
src/rt/valgrind/* -whitespace
911
*.woff binary

branches/stable/configure

Lines changed: 42 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ opt_core() {
283283
fi
284284
done
285285
else
286-
if [ -n "$META" ]
286+
if [ ! -z "$META" ]
287287
then
288288
OP="$OP=<$META>"
289289
fi
@@ -317,7 +317,7 @@ envopt() {
317317
fi
318318

319319
# If script or environment provided a value, save it.
320-
if [ -n "$VV" ]
320+
if [ ! -z "$VV" ]
321321
then
322322
putvar $V
323323
fi
@@ -601,9 +601,7 @@ valopt llvm-root "" "set LLVM root"
601601
valopt python "" "set path to python"
602602
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
603603
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
604-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
605-
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
606-
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
604+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
607605
valopt release-channel "dev" "the name of the release channel to build"
608606
valopt musl-root "/usr/local" "MUSL root installation directory"
609607

@@ -769,7 +767,7 @@ probe CFG_LLDB lldb
769767
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
770768
# installed. Since `javac` is only used if `antlr4` is available,
771769
# probe for it only in this case.
772-
if [ -n "$CFG_ANTLR4" ]
770+
if [ ! -z "$CFG_ANTLR4" ]
773771
then
774772
probe CFG_JAVAC javac
775773
fi
@@ -788,14 +786,14 @@ then
788786
fi
789787
fi
790788

791-
if [ -n "$CFG_GDB" ]
789+
if [ ! -z "$CFG_GDB" ]
792790
then
793791
# Store GDB's version
794792
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
795793
putvar CFG_GDB_VERSION
796794
fi
797795

798-
if [ -n "$CFG_LLDB" ]
796+
if [ ! -z "$CFG_LLDB" ]
799797
then
800798
# Store LLDB's version
801799
CFG_LLDB_VERSION=$($CFG_LLDB --version 2>/dev/null | head -1)
@@ -821,7 +819,7 @@ step_msg "looking for target specific programs"
821819

822820
probe CFG_ADB adb
823821

824-
if [ -n "$CFG_PANDOC" ]
822+
if [ ! -z "$CFG_PANDOC" ]
825823
then
826824
# Extract "MAJOR MINOR" from Pandoc's version number
827825
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
@@ -847,7 +845,7 @@ then
847845
BIN_SUF=.exe
848846
fi
849847

850-
if [ -n "$CFG_ENABLE_LOCAL_RUST" ]
848+
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
851849
then
852850
system_rustc=$(which rustc)
853851
if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
@@ -932,18 +930,18 @@ fi
932930

933931
# Okay, at this point, we have made up our minds about whether we are
934932
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
935-
if [ -n "$CFG_ENABLE_CLANG" ]
933+
if [ ! -z "$CFG_ENABLE_CLANG" ]
936934
then
937935
putvar CFG_ENABLE_CLANG
938936
fi
939937

940938
# Same with jemalloc. save the setting here.
941-
if [ -n "$CFG_DISABLE_JEMALLOC" ]
939+
if [ ! -z "$CFG_DISABLE_JEMALLOC" ]
942940
then
943941
putvar CFG_DISABLE_JEMALLOC
944942
fi
945943

946-
if [ -n "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
944+
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
947945
then
948946
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
949947

@@ -972,7 +970,7 @@ fi
972970
# CFG_ENABLE_CLANG is set, that indicates that we are opting into
973971
# running such safeguards.
974972

975-
if [ -n "$CC" ]
973+
if [ ! -z "$CC" ]
976974
then
977975
msg "skipping compiler inference steps; using provided CC=$CC"
978976
CFG_CC="$CC"
@@ -985,7 +983,7 @@ then
985983
putvar CFG_USING_CLANG
986984
fi
987985
else
988-
if [ -n "$CFG_ENABLE_CLANG" ]
986+
if [ ! -z "$CFG_ENABLE_CLANG" ]
989987
then
990988
if [ -z "$CFG_CLANG" ]
991989
then
@@ -999,7 +997,7 @@ else
999997
fi
1000998
fi
1001999

1002-
if [ -n "$CFG_ENABLE_CLANG" ]
1000+
if [ ! -z "$CFG_ENABLE_CLANG" ]
10031001
then
10041002
case "$CC" in
10051003
(''|*clang)
@@ -1015,7 +1013,7 @@ then
10151013
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10161014
fi
10171015

1018-
if [ -n "$CFG_OSX_CLANG_VERSION" ]
1016+
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
10191017
then
10201018
case $CFG_OSX_CLANG_VERSION in
10211019
(7.0*)
@@ -1044,7 +1042,7 @@ then
10441042
esac
10451043
fi
10461044

1047-
if [ -n "$CFG_ENABLE_CCACHE" ]
1045+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
10481046
then
10491047
if [ -z "$CFG_CCACHE" ]
10501048
then
@@ -1114,24 +1112,20 @@ do
11141112
fi
11151113

11161114
case $i in
1117-
*android*)
1118-
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1119-
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1120-
if [ -z "$ndk" ]
1115+
arm-linux-androideabi)
1116+
1117+
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
11211118
then
1122-
ndk=$CFG_ANDROID_CROSS_PATH
1123-
eval "CFG_${upper_snake_target}_NDK"=$CFG_ANDROID_CROSS_PATH
1124-
warn "generic/default Android NDK option is deprecated (use --$i-ndk option instead)"
1119+
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc not found"
1120+
fi
1121+
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ ]
1122+
then
1123+
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ not found"
1124+
fi
1125+
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar ]
1126+
then
1127+
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar not found"
11251128
fi
1126-
1127-
# Perform a basic sanity check of the NDK
1128-
for android_ndk_tool in "$ndk/bin/$i-gcc" "$ndk/bin/$i-g++" "$ndk/bin/$i-ar"
1129-
do
1130-
if [ ! -f $android_ndk_tool ]
1131-
then
1132-
err "NDK tool $android_ndk_tool not found (bad or missing --$i-ndk option?)"
1133-
fi
1134-
done
11351129
;;
11361130

11371131
arm-apple-darwin)
@@ -1183,13 +1177,8 @@ do
11831177
# INCLUDE and LIB variables for MSVC so we can set those in the
11841178
# build system as well.
11851179
install=$(reg QUERY \
1186-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
1180+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
11871181
-v InstallDir)
1188-
if [ -z "$install" ]; then
1189-
install=$(reg QUERY \
1190-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1191-
-v InstallDir)
1192-
fi
11931182
need_ok "couldn't find visual studio install root"
11941183
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11951184
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1210,7 +1199,7 @@ do
12101199
;;
12111200
esac
12121201
bindir="${CFG_MSVC_ROOT}/VC/bin"
1213-
if [ -n "$msvc_part" ]; then
1202+
if [ ! -z "$msvc_part" ]; then
12141203
bindir="$bindir/$msvc_part"
12151204
fi
12161205
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1240,7 +1229,7 @@ do
12401229
esac
12411230
done
12421231

1243-
if [ -n "$CFG_PERF" ]
1232+
if [ ! -z "$CFG_PERF" ]
12441233
then
12451234
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
12461235
if [ -z "$HAVE_PERF_LOGFD" ];
@@ -1350,11 +1339,11 @@ then
13501339
"${CFG_GIT}" submodule init
13511340

13521341
# Disable submodules that we're not using
1353-
if [ -n "${CFG_LLVM_ROOT}" ]; then
1342+
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
13541343
msg "git: submodule deinit src/llvm"
13551344
"${CFG_GIT}" submodule deinit src/llvm
13561345
fi
1357-
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
1346+
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
13581347
msg "git: submodule deinit src/jemalloc"
13591348
"${CFG_GIT}" submodule deinit src/jemalloc
13601349
fi
@@ -1401,7 +1390,7 @@ do
14011390
if [ -z $CFG_LLVM_ROOT ]
14021391
then
14031392
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1404-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1393+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
14051394
then
14061395
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
14071396
# Just use LLVM straight from its build directory to
@@ -1457,7 +1446,7 @@ do
14571446
msg "configuring LLVM for $t with cmake"
14581447

14591448
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1460-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1449+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14611450
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14621451
else
14631452
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1471,22 +1460,12 @@ do
14711460

14721461
msg "configuring LLVM with:"
14731462
msg "$CMAKE_ARGS"
1474-
case "$CFG_MSVC_ROOT" in
1475-
*14.0*)
1476-
generator="Visual Studio 14 2015"
1477-
;;
1478-
*12.0*)
1479-
generator="Visual Studio 12 2013"
1480-
;;
1481-
*)
1482-
err "can't determine generator for LLVM cmake"
1483-
;;
1484-
esac
14851463
case "$t" in
14861464
x86_64-*)
1487-
generator="$generator Win64"
1465+
generator="Visual Studio 12 2013 Win64"
14881466
;;
14891467
i686-*)
1468+
generator="Visual Studio 12 2013"
14901469
;;
14911470
*)
14921471
err "can only build LLVM for x86 platforms"
@@ -1559,7 +1538,7 @@ do
15591538

15601539
(*)
15611540
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1562-
if [ -n "$CFG_ENABLE_CCACHE" ]
1541+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
15631542
then
15641543
if [ -z "$CFG_CCACHE" ]
15651544
then
@@ -1688,26 +1667,25 @@ putvar CFG_HOST
16881667
putvar CFG_TARGET
16891668
putvar CFG_LIBDIR_RELATIVE
16901669
putvar CFG_DISABLE_MANAGE_SUBMODULES
1691-
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1692-
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
1670+
putvar CFG_ANDROID_CROSS_PATH
16931671
putvar CFG_MANDIR
16941672

16951673
# Avoid spurious warnings from clang by feeding it original source on
16961674
# ccache-miss rather than preprocessed input.
1697-
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
1675+
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
16981676
then
16991677
CFG_CCACHE_CPP2=1
17001678
putvar CFG_CCACHE_CPP2
17011679
fi
17021680

1703-
if [ -n "$CFG_ENABLE_CCACHE" ]
1681+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
17041682
then
17051683
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
17061684
putvar CFG_CCACHE_BASEDIR
17071685
fi
17081686

17091687

1710-
if [ -n $BAD_PANDOC ]
1688+
if [ ! -z $BAD_PANDOC ]
17111689
then
17121690
CFG_PANDOC=
17131691
putvar CFG_PANDOC

branches/stable/mk/cfg/aarch64-linux-android.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# aarch64-linux-android configuration
22
# CROSS_PREFIX_aarch64-linux-android-
3-
CC_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc
4-
CXX_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-g++
5-
CPP_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc -E
6-
AR_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-ar
3+
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
4+
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
5+
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
6+
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
77
CFG_LIB_NAME_aarch64-linux-android=lib$(1).so
88
CFG_STATIC_LIB_NAME_aarch64-linux-android=lib$(1).a
99
CFG_LIB_GLOB_aarch64-linux-android=lib$(1)-*.so

branches/stable/mk/cfg/arm-linux-androideabi.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# arm-linux-androideabi configuration
2-
CC_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc
3-
CXX_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-g++
4-
CPP_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc -E
5-
AR_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-ar
2+
CC_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
3+
CXX_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
4+
CPP_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc -E
5+
AR_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-ar
66
CFG_LIB_NAME_arm-linux-androideabi=lib$(1).so
77
CFG_STATIC_LIB_NAME_arm-linux-androideabi=lib$(1).a
88
CFG_LIB_GLOB_arm-linux-androideabi=lib$(1)-*.so

branches/stable/src/doc/reference.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,8 @@ always been designed to be compiled. For these reasons, this section assumes a
591591
compiler.
592592

593593
Rust's semantics obey a *phase distinction* between compile-time and
594-
run-time.[^phase-distinction] Semantic rules that have a *static
595-
interpretation* govern the success or failure of compilation, while
596-
semantic rules
594+
run-time.[^phase-distinction] Those semantic rules that have a *static
595+
interpretation* govern the success or failure of compilation. Those semantics
597596
that have a *dynamic interpretation* govern the behavior of the program at
598597
run-time.
599598

@@ -2369,8 +2368,6 @@ The currently implemented features of the reference compiler are:
23692368
internally without imposing on callers
23702369
(i.e. making them behave like function calls in
23712370
terms of encapsulation).
2372-
* - `default_type_parameter_fallback` - Allows type parameter defaults to
2373-
influence type inference.
23742371

23752372
If a feature is promoted to a language feature, then all existing programs will
23762373
start to receive compilation warnings about `#![feature]` directives which enabled

branches/stable/src/doc/trpl/choosing-your-guarantees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The main guarantee provided here is that the data will not be destroyed until al
8181
are out of scope.
8282

8383
This should be used when we wish to dynamically allocate and share some data (read-only) between
84-
various portions of your program, where it is not certain which portion will finish using the pointer
84+
various portions of yur program, where it is not certain which portion will finish using the pointer
8585
last. It's a viable alternative to `&T` when `&T` is either impossible to statically check for
8686
correctness, or creates extremely unergonomic code where the programmer does not wish to spend the
8787
development cost of working with.

branches/stable/src/doc/trpl/compiler-plugins.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
6161
("I", 1)];
6262
6363
let text = match args {
64-
[TtToken(_, token::Ident(s, _))] => s.to_string(),
64+
[TtToken(_, token::Ident(s, _))] => token::get_ident(s).to_string(),
6565
_ => {
6666
cx.span_err(sp, "argument should be a single identifier");
6767
return DummyResult::any(sp);
@@ -186,7 +186,8 @@ impl LintPass for Pass {
186186
}
187187
188188
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
189-
if it.ident.name == "lintme" {
189+
let name = token::get_ident(it.ident);
190+
if name.get() == "lintme" {
190191
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
191192
}
192193
}

0 commit comments

Comments
 (0)