Skip to content

Commit df2c4fd

Browse files
committed
---
yaml --- r: 235931 b: refs/heads/stable c: aa6efd9 h: refs/heads/master i: 235929: 596be48 235927: 20591ce v: v3
1 parent d963407 commit df2c4fd

File tree

293 files changed

+10040
-2816
lines changed

Some content is hidden

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

293 files changed

+10040
-2816
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: 33a7e67904a500b11973a197f53a0a47501baa48
32+
refs/heads/stable: aa6efd959e450e1cea177a3f6cd6bab6d80d4154
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

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

319319
# If script or environment provided a value, save it.
320-
if [ ! -z "$VV" ]
320+
if [ -n "$VV" ]
321321
then
322322
putvar $V
323323
fi
324324
}
325325

326+
enable_if_not_disabled() {
327+
local OP=$1
328+
local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
329+
local ENAB_V="CFG_ENABLE_$UOP"
330+
local EXPLICITLY_DISABLED="CFG_DISABLE_${UOP}_PROVIDED"
331+
eval VV=\$$EXPLICITLY_DISABLED
332+
if [ -z "$VV" ]; then
333+
eval $ENAB_V=1
334+
fi
335+
}
336+
326337
to_llvm_triple() {
327338
case $1 in
328339
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
@@ -673,10 +684,12 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
673684
CFG_DISABLE_OPTIMIZE=1
674685
CFG_DISABLE_OPTIMIZE_CXX=1
675686
fi
676-
CFG_ENABLE_DEBUG_ASSERTIONS=1
677-
CFG_ENABLE_DEBUG_JEMALLOC=1
678-
CFG_ENABLE_DEBUGINFO=1
679-
CFG_ENABLE_LLVM_ASSERTIONS=1
687+
688+
# Set following variables to 1 unless setting already provided
689+
enable_if_not_disabled debug-assertions
690+
enable_if_not_disabled debug-jemalloc
691+
enable_if_not_disabled debuginfo
692+
enable_if_not_disabled llvm-assertions
680693
fi
681694

682695
# OK, now write the debugging options
@@ -756,7 +769,7 @@ probe CFG_LLDB lldb
756769
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
757770
# installed. Since `javac` is only used if `antlr4` is available,
758771
# probe for it only in this case.
759-
if [ ! -z "$CFG_ANTLR4" ]
772+
if [ -n "$CFG_ANTLR4" ]
760773
then
761774
probe CFG_JAVAC javac
762775
fi
@@ -775,14 +788,14 @@ then
775788
fi
776789
fi
777790

778-
if [ ! -z "$CFG_GDB" ]
791+
if [ -n "$CFG_GDB" ]
779792
then
780793
# Store GDB's version
781794
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
782795
putvar CFG_GDB_VERSION
783796
fi
784797

785-
if [ ! -z "$CFG_LLDB" ]
798+
if [ -n "$CFG_LLDB" ]
786799
then
787800
# Store LLDB's version
788801
CFG_LLDB_VERSION=$($CFG_LLDB --version 2>/dev/null | head -1)
@@ -808,7 +821,7 @@ step_msg "looking for target specific programs"
808821

809822
probe CFG_ADB adb
810823

811-
if [ ! -z "$CFG_PANDOC" ]
824+
if [ -n "$CFG_PANDOC" ]
812825
then
813826
# Extract "MAJOR MINOR" from Pandoc's version number
814827
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
@@ -834,7 +847,7 @@ then
834847
BIN_SUF=.exe
835848
fi
836849

837-
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
850+
if [ -n "$CFG_ENABLE_LOCAL_RUST" ]
838851
then
839852
system_rustc=$(which rustc)
840853
if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
@@ -919,18 +932,18 @@ fi
919932

920933
# Okay, at this point, we have made up our minds about whether we are
921934
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
922-
if [ ! -z "$CFG_ENABLE_CLANG" ]
935+
if [ -n "$CFG_ENABLE_CLANG" ]
923936
then
924937
putvar CFG_ENABLE_CLANG
925938
fi
926939

927940
# Same with jemalloc. save the setting here.
928-
if [ ! -z "$CFG_DISABLE_JEMALLOC" ]
941+
if [ -n "$CFG_DISABLE_JEMALLOC" ]
929942
then
930943
putvar CFG_DISABLE_JEMALLOC
931944
fi
932945

933-
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
946+
if [ -n "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
934947
then
935948
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
936949

@@ -959,7 +972,7 @@ fi
959972
# CFG_ENABLE_CLANG is set, that indicates that we are opting into
960973
# running such safeguards.
961974

962-
if [ ! -z "$CC" ]
975+
if [ -n "$CC" ]
963976
then
964977
msg "skipping compiler inference steps; using provided CC=$CC"
965978
CFG_CC="$CC"
@@ -972,7 +985,7 @@ then
972985
putvar CFG_USING_CLANG
973986
fi
974987
else
975-
if [ ! -z "$CFG_ENABLE_CLANG" ]
988+
if [ -n "$CFG_ENABLE_CLANG" ]
976989
then
977990
if [ -z "$CFG_CLANG" ]
978991
then
@@ -986,7 +999,7 @@ else
986999
fi
9871000
fi
9881001

989-
if [ ! -z "$CFG_ENABLE_CLANG" ]
1002+
if [ -n "$CFG_ENABLE_CLANG" ]
9901003
then
9911004
case "$CC" in
9921005
(''|*clang)
@@ -1002,7 +1015,7 @@ then
10021015
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10031016
fi
10041017

1005-
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
1018+
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10061019
then
10071020
case $CFG_OSX_CLANG_VERSION in
10081021
(7.0*)
@@ -1031,7 +1044,7 @@ then
10311044
esac
10321045
fi
10331046

1034-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1047+
if [ -n "$CFG_ENABLE_CCACHE" ]
10351048
then
10361049
if [ -z "$CFG_CCACHE" ]
10371050
then
@@ -1170,8 +1183,13 @@ do
11701183
# INCLUDE and LIB variables for MSVC so we can set those in the
11711184
# build system as well.
11721185
install=$(reg QUERY \
1173-
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1186+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
11741187
-v InstallDir)
1188+
if [ -z "$install" ]; then
1189+
install=$(reg QUERY \
1190+
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
1191+
-v InstallDir)
1192+
fi
11751193
need_ok "couldn't find visual studio install root"
11761194
CFG_MSVC_ROOT=$(echo "$install" | grep InstallDir | sed 's/.*REG_SZ[ ]*//')
11771195
CFG_MSVC_ROOT=$(dirname "$CFG_MSVC_ROOT")
@@ -1192,7 +1210,7 @@ do
11921210
;;
11931211
esac
11941212
bindir="${CFG_MSVC_ROOT}/VC/bin"
1195-
if [ ! -z "$msvc_part" ]; then
1213+
if [ -n "$msvc_part" ]; then
11961214
bindir="$bindir/$msvc_part"
11971215
fi
11981216
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1222,7 +1240,7 @@ do
12221240
esac
12231241
done
12241242

1225-
if [ ! -z "$CFG_PERF" ]
1243+
if [ -n "$CFG_PERF" ]
12261244
then
12271245
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
12281246
if [ -z "$HAVE_PERF_LOGFD" ];
@@ -1332,11 +1350,11 @@ then
13321350
"${CFG_GIT}" submodule init
13331351

13341352
# Disable submodules that we're not using
1335-
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
1353+
if [ -n "${CFG_LLVM_ROOT}" ]; then
13361354
msg "git: submodule deinit src/llvm"
13371355
"${CFG_GIT}" submodule deinit src/llvm
13381356
fi
1339-
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
1357+
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
13401358
msg "git: submodule deinit src/jemalloc"
13411359
"${CFG_GIT}" submodule deinit src/jemalloc
13421360
fi
@@ -1383,7 +1401,7 @@ do
13831401
if [ -z $CFG_LLVM_ROOT ]
13841402
then
13851403
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1386-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1404+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
13871405
then
13881406
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
13891407
# Just use LLVM straight from its build directory to
@@ -1439,7 +1457,7 @@ do
14391457
msg "configuring LLVM for $t with cmake"
14401458

14411459
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1442-
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1460+
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14431461
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14441462
else
14451463
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1453,12 +1471,22 @@ do
14531471

14541472
msg "configuring LLVM with:"
14551473
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
14561485
case "$t" in
14571486
x86_64-*)
1458-
generator="Visual Studio 12 2013 Win64"
1487+
generator="$generator Win64"
14591488
;;
14601489
i686-*)
1461-
generator="Visual Studio 12 2013"
14621490
;;
14631491
*)
14641492
err "can only build LLVM for x86 platforms"
@@ -1531,7 +1559,7 @@ do
15311559

15321560
(*)
15331561
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1534-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1562+
if [ -n "$CFG_ENABLE_CCACHE" ]
15351563
then
15361564
if [ -z "$CFG_CCACHE" ]
15371565
then
@@ -1666,20 +1694,20 @@ putvar CFG_MANDIR
16661694

16671695
# Avoid spurious warnings from clang by feeding it original source on
16681696
# ccache-miss rather than preprocessed input.
1669-
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
1697+
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
16701698
then
16711699
CFG_CCACHE_CPP2=1
16721700
putvar CFG_CCACHE_CPP2
16731701
fi
16741702

1675-
if [ ! -z "$CFG_ENABLE_CCACHE" ]
1703+
if [ -n "$CFG_ENABLE_CCACHE" ]
16761704
then
16771705
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
16781706
putvar CFG_CCACHE_BASEDIR
16791707
fi
16801708

16811709

1682-
if [ ! -z $BAD_PANDOC ]
1710+
if [ -n $BAD_PANDOC ]
16831711
then
16841712
CFG_PANDOC=
16851713
putvar CFG_PANDOC

branches/stable/mk/rt.mk

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ NATIVE_DEPS_miniz_$(1) = miniz.c
5454
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
5555
rust_android_dummy.c
5656
NATIVE_DEPS_rustrt_native_$(1) := arch/$$(HOST_$(1))/record_sp.S
57-
ifeq ($$(findstring msvc,$(1)),msvc)
58-
ifeq ($$(findstring i686,$(1)),i686)
59-
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_32.ll
60-
else
61-
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_64.ll
62-
endif
63-
else
64-
NATIVE_DEPS_rustrt_native_$(1) += rust_try.ll
65-
endif
6657
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
6758
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
6859

@@ -76,14 +67,6 @@ NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
7667

7768
RT_OUTPUT_DIR_$(1) := $(1)/rt
7869

79-
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.ll $$(MKFILE_DEPS) \
80-
$$(LLVM_CONFIG_$$(CFG_BUILD))
81-
@mkdir -p $$(@D)
82-
@$$(call E, compile: $$@)
83-
$$(Q)$$(LLC_$$(CFG_BUILD)) $$(CFG_LLC_FLAGS_$(1)) \
84-
-filetype=obj -mtriple=$$(CFG_LLVM_TARGET_$(1)) \
85-
-relocation-model=pic -o $$@ $$<
86-
8770
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
8871
@mkdir -p $$(@D)
8972
@$$(call E, compile: $$@)
@@ -122,7 +105,6 @@ define THIRD_PARTY_LIB
122105
OBJS_$(2)_$(1) := $$(NATIVE_DEPS_$(2)_$(1):%=$$(RT_OUTPUT_DIR_$(1))/%)
123106
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.c=.o)
124107
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.cpp=.o)
125-
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.ll=.o)
126108
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.S=.o)
127109
NATIVE_$(2)_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),$(2))
128110
$$(RT_OUTPUT_DIR_$(1))/$$(NATIVE_$(2)_$(1)): $$(OBJS_$(2)_$(1))

branches/stable/src/doc/reference.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,9 @@ 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] Those semantic rules that have a *static
595-
interpretation* govern the success or failure of compilation. Those semantics
594+
run-time.[^phase-distinction] Semantic rules that have a *static
595+
interpretation* govern the success or failure of compilation, while
596+
semantic rules
596597
that have a *dynamic interpretation* govern the behavior of the program at
597598
run-time.
598599

@@ -1636,6 +1637,10 @@ The type of a function declared in an extern block is `extern "abi" fn(A1, ...,
16361637
An) -> R`, where `A1...An` are the declared types of its arguments and `R` is
16371638
the declared return type.
16381639

1640+
It is valid to add the `link` attribute on an empty extern block. You can use
1641+
this to satisfy the linking requirements of extern blocks elsewhere in your code
1642+
(including upstream crates) instead of adding the attribute to each extern block.
1643+
16391644
## Visibility and Privacy
16401645

16411646
These two terms are often used interchangeably, and what they are attempting to
@@ -2364,6 +2369,8 @@ The currently implemented features of the reference compiler are:
23642369
internally without imposing on callers
23652370
(i.e. making them behave like function calls in
23662371
terms of encapsulation).
2372+
* - `default_type_parameter_fallback` - Allows type parameter defaults to
2373+
influence type inference.
23672374

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

branches/stable/src/doc/rust.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ a > code {
221221
color: #428BCA;
222222
}
223223

224+
.section-header > a > code {
225+
color: #8D1A38;
226+
}
227+
224228
/* Code highlighting */
225229
pre.rust .kw { color: #8959A8; }
226230
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }

branches/stable/src/doc/trpl/SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [Iterators](iterators.md)
1717
* [Concurrency](concurrency.md)
1818
* [Error Handling](error-handling.md)
19+
* [Choosing your Guarantees](choosing-your-guarantees.md)
1920
* [FFI](ffi.md)
2021
* [Borrow and AsRef](borrow-and-asref.md)
2122
* [Release Channels](release-channels.md)
@@ -63,7 +64,7 @@
6364
* [No stdlib](no-stdlib.md)
6465
* [Intrinsics](intrinsics.md)
6566
* [Lang items](lang-items.md)
66-
* [Link args](link-args.md)
67+
* [Advanced linking](advanced-linking.md)
6768
* [Benchmark Tests](benchmark-tests.md)
6869
* [Box Syntax and Patterns](box-syntax-and-patterns.md)
6970
* [Slice Patterns](slice-patterns.md)

0 commit comments

Comments
 (0)