Auto merge of #45386 - kennytm:rollup, r=kennytm

Rollup of 8 pull requests

- Successful merges: #45343, #45349, #45352, #45374, #45375, #45376, #45377, #45382
- Failed merges:
This commit is contained in:
bors 2017-10-19 18:22:15 +00:00
commit 439f7521b8
62 changed files with 88 additions and 87 deletions

View file

@ -129,14 +129,14 @@ configure your directory to use this build, like so:
# configure to use local rust instead of downloading a beta.
# `--local-rust-root` is optional here. If elided, we will
# use whatever rustc we find on your PATH.
> configure --enable-rustbuild --local-rust-root=~/.cargo/ --enable-local-rebuild
> ./configure --local-rust-root=~/.cargo/ --enable-local-rebuild
```
After that, you can use the `--incremental` flag to actually do
incremental builds:
```
> ../x.py build --incremental
> ./x.py build --incremental
```
The `--incremental` flag will store incremental compilation artifacts

View file

@ -532,7 +532,7 @@ class RustBuild(object):
"""
config = self.get_toml(program)
if config:
return config
return os.path.expanduser(config)
return os.path.join(self.bin_root(), "bin", "{}{}".format(
program, self.exe_suffix()))

View file

@ -630,7 +630,7 @@ impl Step for Analysis {
let image = tmpdir(build).join(format!("{}-{}-image", name, target));
let src = build.stage_out(compiler, Mode::Libstd)
.join(target).join("release").join("deps");
.join(target).join(build.cargo_dir()).join("deps");
let image_src = src.join("save-analysis");
let dst = image.join("lib/rustlib").join(target).join("analysis");

View file

@ -16,6 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV PATH=$PATH:/emsdk-portable
ENV PATH=$PATH:/emsdk-portable/clang/e1.37.13_64bit/
ENV PATH=$PATH:/emsdk-portable/emscripten/1.37.13/
@ -28,7 +31,4 @@ ENV TARGETS=asmjs-unknown-emscripten
ENV RUST_CONFIGURE_ARGS --target=$TARGETS
ENV SCRIPT python2.7 ../x.py test --target $TARGETS
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV SCRIPT python2.7 ../x.py test --target $TARGETS src/test/run-pass

View file

@ -38,37 +38,38 @@ cd solaris
dpkg --add-architecture $APT_ARCH
apt-get update
apt-get download \
libc:$APT_ARCH \
apt-get download $(apt-cache depends --recurse --no-replaces \
libc-dev:$APT_ARCH \
libm:$APT_ARCH \
libm-dev:$APT_ARCH \
libpthread:$APT_ARCH \
libpthread-dev:$APT_ARCH \
libresolv:$APT_ARCH \
libresolv-dev:$APT_ARCH \
librt:$APT_ARCH \
librt-dev:$APT_ARCH \
libsocket:$APT_ARCH \
libsocket-dev:$APT_ARCH \
system-crt:$APT_ARCH \
system-header:$APT_ARCH
system-header:$APT_ARCH \
| grep "^\w")
for deb in *$APT_ARCH.deb; do
dpkg -x $deb .
done
# Strip Solaris 11 functions that are optionally used by libbacktrace.
# Remove Solaris 11 functions that are optionally used by libbacktrace.
# This is for Solaris 10 compatibility.
$ARCH-sun-solaris2.10-strip -N dl_iterate_phdr -N strnlen lib/$LIB_ARCH/libc.so
rm usr/include/link.h
patch -p0 << 'EOF'
--- usr/include/string.h
+++ usr/include/string10.h
@@ -93 +92,0 @@
-extern size_t strnlen(const char *, size_t);
EOF
mkdir /usr/local/$ARCH-sun-solaris2.10/usr
mv usr/include /usr/local/$ARCH-sun-solaris2.10/usr/include
mv usr/lib/$LIB_ARCH/* /usr/local/$ARCH-sun-solaris2.10/lib
mv lib/$LIB_ARCH/* /usr/local/$ARCH-sun-solaris2.10/lib
ln -s /usr/local/$ARCH-sun-solaris2.10/usr/include /usr/local/$ARCH-sun-solaris2.10/sys-include
ln -s /usr/local/$ARCH-sun-solaris2.10/usr/include /usr/local/$ARCH-sun-solaris2.10/include
ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/sys-include
ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/include
cd ..
rm -rf solaris
@ -97,8 +98,7 @@ hide_output ../gcc-$GCC/configure \
--disable-libada \
--disable-libsanitizer \
--disable-libquadmath-support \
--disable-lto \
--with-sysroot=/usr/local/$ARCH-sun-solaris2.10
--disable-lto
hide_output make -j10
hide_output make install

View file

@ -959,13 +959,15 @@ impl str {
/// assert_eq!(s.find("Léopard"), Some(13));
/// ```
///
/// More complex patterns with closures:
/// More complex patterns using point-free style and closures:
///
/// ```
/// let s = "Löwe 老虎 Léopard";
///
/// assert_eq!(s.find(char::is_whitespace), Some(5));
/// assert_eq!(s.find(char::is_lowercase), Some(1));
/// assert_eq!(s.find(|c: char| c.is_whitespace() || c.is_lowercase()), Some(1));
/// assert_eq!(s.find(|c: char| (c < 'o') && (c > 'a')), Some(4));
/// ```
///
/// Not finding the pattern:

View file

@ -98,7 +98,7 @@ entire program, and each did a particular check of transformation.
We are gradually replacing this pass-based code with an alternative
setup based on on-demand **queries**. In the query-model, we work
backwards, executing a *query* that expresses our ultimate goal (e.g.,
"compiler this crate"). This query in turn may make other queries
"compile this crate"). This query in turn may make other queries
(e.g., "get me a list of all modules in the crate"). Those queries
make other queries that ultimately bottom out in the base operations,
like parsing the input, running the type-checker, and so forth. This
@ -162,7 +162,7 @@ The compiler uses a number of...idiosyncratic abbreviations and
things. This glossary attempts to list them and give you a few
pointers for understanding them better.
- AST -- the **abstract syntax tree** produced the `syntax` crate; reflects user syntax
- AST -- the **abstract syntax tree** produced by the `syntax` crate; reflects user syntax
very closely.
- codegen unit -- when we produce LLVM IR, we group the Rust code into a number of codegen
units. Each of these units is processed by LLVM independently from one another,

View file

@ -42,7 +42,7 @@ wasteful.
Often, we wish to write code that explicitly asserts that it is not
taking place during inference. In that case, there is no "local"
arena, and all the types that you can access are allocated in the
global arena. To express this, the idea is to us the same lifetime
global arena. To express this, the idea is to use the same lifetime
for the `'gcx` and `'tcx` parameters of `TyCtxt`. Just to be a touch
confusing, we tend to use the name `'tcx` in such contexts. Here is an
example:
@ -100,10 +100,10 @@ fn test_type<'tcx>(ty: Ty<'tcx>) {
The `sty` field (the origin of this name is unclear to me; perhaps
structural type?) is of type `TypeVariants<'tcx>`, which is an enum
definined all of the different kinds of types in the compiler.
defining all of the different kinds of types in the compiler.
> NB: inspecting the `sty` field on types during type inference can be
> risky, as there are may be inference variables and other things to
> risky, as there may be inference variables and other things to
> consider, or sometimes types are not yet known that will become
> known later.).
@ -132,7 +132,7 @@ a safe approximation, so that is what you get back.
> you are going to be testing for type equality, you probably need to
> start looking into the inference code to do it right.
You can also find various common types in the tcx itself by accessing
You can also find various common types in the `tcx` itself by accessing
`tcx.types.bool`, `tcx.types.char`, etc (see `CommonTypes` for more).
### Beyond types: Other kinds of arena-allocated data structures
@ -143,7 +143,7 @@ module. Here are a few examples:
- `Substs`, allocated with `mk_substs` -- this will intern a slice of types, often used to
specify the values to be substituted for generics (e.g., `HashMap<i32, u32>`
would be represented as a slice `&'tcx [tcx.types.i32, tcx.types.u32]`.
would be represented as a slice `&'tcx [tcx.types.i32, tcx.types.u32]`).
- `TraitRef`, typically passed by value -- a **trait reference**
consists of a reference to a trait along with its various type
parameters (including `Self`), like `i32: Display` (here, the def-id

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no asm! support
#![feature(asm, rustc_attrs)]
#![allow(unused)]

View file

@ -9,7 +9,7 @@
// except according to those terms.
// pretty-expanded FIXME #23616
// ignore-emscripten
// ignore-emscripten no asm
#![feature(asm)]

View file

@ -9,7 +9,7 @@
// except according to those terms.
// ignore-windows - this is a unix-specific test
// ignore-emscripten
// ignore-emscripten no processes
#![feature(process_exec, libc)]

View file

@ -10,7 +10,8 @@
// ignore-windows - this is a unix-specific test
// ignore-pretty issue #37199
// ignore-emscripten
// ignore-emscripten no processes
#![feature(process_exec)]
use std::env;

View file

@ -9,7 +9,7 @@
// except according to those terms.
// compile-flags:--test
// ignore-emscripten
// ignore-emscripten no processes
// NB: These tests kill child processes. Valgrind sees these children as leaking
// memory, which makes for some *confusing* logs. That's why these are here

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::env::args;
use std::process::Command;

View file

@ -12,7 +12,7 @@
// ignore-android
// ignore-windows
// ignore-emscripten
// ignore-emscripten no execve
// no-prefer-dynamic
#![feature(libc)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten env vars don't work?
#![feature(path)]

View file

@ -12,7 +12,7 @@
// pretty-expanded FIXME #23616
// ignore-msvc
// ignore-emscripten
// ignore-emscripten emcc asserts on an empty struct as an argument
#[repr(C)]
struct TwoU8s {

View file

@ -10,7 +10,7 @@
// ignore-windows
// ignore-android
// ignore-emscripten
// ignore-emscripten no processes
// ignore-haiku
#![feature(libc)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten missing rust_begin_unwind
// ignore-emscripten no no_std executables
#![feature(lang_items, start, alloc)]
#![no_std]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no threads support
// compile-flags: --test
#![feature(generators, generator_trait)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten i128 doesn't work
#![feature(i128_type, test)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
// Make sure that if a process doesn't have its stdio/stderr descriptors set up
// that we don't die in a large ball of fire

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
#![feature(io, process_capture)]
use std::env;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
#![feature(io, process_capture)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::env;
use std::process::Command;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::process::Command;
use std::env;

View file

@ -8,7 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
#![feature(std_misc, os)]
#[cfg(unix)]

View file

@ -9,7 +9,7 @@
// except according to those terms.
// pretty-expanded FIXME #23616
// ignore-emscripten
// ignore-emscripten no threads
use std::thread::Builder;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no threads
use std::thread;
use std::env;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no threads
// compile-flags: -O
// Tests that the `vec!` macro does not overflow the stack when it is

View file

@ -9,7 +9,7 @@
// except according to those terms.
// aux-build:issue-29485.rs
// ignore-emscripten
// ignore-emscripten no threads
#[feature(recover)]

View file

@ -10,8 +10,6 @@
// write_volatile causes an LLVM assert with composite types
// ignore-emscripten See #41299: probably a bad optimization
#![feature(volatile)]
use std::ptr::{read_volatile, write_volatile};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
// Previously libstd would set stdio descriptors of a child process
// by `dup`ing the requested descriptors to inherit directly into the

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::process::{Command, Stdio};
use std::env;

View file

@ -10,7 +10,7 @@
// ignore-windows
// ignore-macos
// ignore-emscripten
// ignore-emscripten doesn't support this linkage
// aux-build:linkage1.rs
#![feature(linkage)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
fn check_for_no_backtrace(test: std::process::Output) {
assert!(!test.status.success());

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
// ignore-android
#![feature(libc)]

View file

@ -10,7 +10,7 @@
// ignore-android: FIXME (#20004)
// ignore-musl
// ignore-emscripten
// ignore-emscripten no processes
#![feature(asm)]
#![feature(libc)]

View file

@ -7,8 +7,6 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten Not sure what's happening here.
use std::mem;

View file

@ -7,8 +7,6 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
use std::mem;

View file

@ -11,7 +11,7 @@
// compile-flags:-C panic=abort
// aux-build:exit-success-if-unwind.rs
// no-prefer-dynamic
// ignore-emscripten Function not implemented
// ignore-emscripten no processes
extern crate exit_success_if_unwind;

View file

@ -10,7 +10,7 @@
// compile-flags:-C panic=abort
// no-prefer-dynamic
// ignore-emscripten Function not implemented.
// ignore-emscripten no processes
use std::process::Command;
use std::env;

View file

@ -10,7 +10,7 @@
// compile-flags:-C lto -C panic=abort
// no-prefer-dynamic
// ignore-emscripten Function not implemented.
// ignore-emscripten no processes
use std::process::Command;
use std::env;

View file

@ -10,7 +10,7 @@
// compile-flags:-C lto -C panic=unwind
// no-prefer-dynamic
// ignore-emscripten Function not implemented.
// ignore-emscripten no processes
use std::process::Command;
use std::env;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::process::Command;
use std::env;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::env;
use std::process::{self, Command, Stdio};

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::process::Command;
use std::env;

View file

@ -16,7 +16,7 @@
// non-ASCII characters. The child process ensures all the strings are
// intact.
// ignore-emscripten
// ignore-emscripten no processes
use std::io::prelude::*;
use std::io;

View file

@ -7,7 +7,8 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten Function not implemented.
// ignore-emscripten no processes
use std::env;
use std::io;

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten spawning processes is not supported
#![feature(start)]

View file

@ -9,7 +9,7 @@
// except according to those terms.
// ignore-windows
// ignore-emscripten
// ignore-emscripten no processes
use std::env;
use std::process::Command;

View file

@ -11,7 +11,7 @@
// Be sure that when a SIGPIPE would have been received that the entire process
// doesn't die in a ball of fire, but rather it's gracefully handled.
// ignore-emscripten
// ignore-emscripten no processes
use std::env;
use std::io::prelude::*;

View file

@ -7,7 +7,8 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten linking with emcc failed
// ignore-emscripten FIXME(#45351) hits an LLVM assert
#![feature(repr_simd, platform_intrinsics, concat_idents, test)]
#![allow(non_camel_case_types)]

View file

@ -11,7 +11,7 @@
// ignore-arm
// ignore-aarch64
// ignore-wasm
// ignore-emscripten
// ignore-emscripten no processes
// ignore-musl FIXME #31506
// ignore-pretty
// no-system-llvm

View file

@ -11,7 +11,7 @@
// ignore-arm
// ignore-aarch64
// ignore-wasm
// ignore-emscripten
// ignore-emscripten no processes
// ignore-musl FIXME #31506
// no-system-llvm

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
use std::env;
use std::io::prelude::*;

View file

@ -10,7 +10,7 @@
// compile-flags: -Z thinlto -C codegen-units=8 -O
// min-llvm-version 4.0
// ignore-emscripten
// ignore-emscripten can't inspect instructions on emscripten
// We want to assert here that ThinLTO will inline across codegen units. There's
// not really a great way to do that in general so we sort of hack around it by

View file

@ -12,7 +12,7 @@
// aux-build:thin-lto-inlines-aux.rs
// min-llvm-version 4.0
// no-prefer-dynamic
// ignore-emscripten
// ignore-emscripten can't inspect instructions on emscripten
// We want to assert here that ThinLTO will inline across codegen units. There's
// not really a great way to do that in general so we sort of hack around it by

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
#![feature(process_try_wait)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten u128 not supported
#![feature(i128_type, test)]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten missing rust_begin_unwind
// ignore-emscripten no no_std executables
#![feature(lang_items, start, libc, alloc)]
#![no_std]

View file

@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// ignore-emscripten
// ignore-emscripten no processes
#![feature(libc)]