Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 8 pull requests #45386

Merged
merged 19 commits into from
Oct 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b3ea6e5
Make Solaris builder compatible with Solaris 10 retry
bgermann Oct 17, 2017
0597bda
Remove tabs
bgermann Oct 17, 2017
da7aab6
added examples of closures
pvdrz Oct 18, 2017
d9ecdfe
test: Update Emscripten failures/passing
alexcrichton Oct 18, 2017
2a889eb
added non trivial examples of closures for str::find
pvdrz Oct 18, 2017
0d6923d
Remove --enable-rustbuild config option from example
topecongiro Oct 18, 2017
e11abd1
Fix typos
topecongiro Oct 18, 2017
0dde8cd
Allow passing a path with tilde
topecongiro Oct 18, 2017
547743e
Fix typos in src/librustc/README.md
topecongiro Oct 18, 2017
622d20a
Fix typos in librustc/ty/README.md
topecongiro Oct 19, 2017
27cc119
rustbuild: fix dist in debug mode
Keruspe Oct 18, 2017
7da795b
Rollup merge of #45343 - bgermann:master, r=alexcrichton
kennytm Oct 19, 2017
207dab5
Rollup merge of #45349 - christianpoveda:closures_str_find, r=stevekl…
kennytm Oct 19, 2017
342e01b
Rollup merge of #45352 - alexcrichton:emscripten-tests, r=nikomatsakis
kennytm Oct 19, 2017
3de1f8b
Rollup merge of #45374 - topecongiro:remove-enable-rustbuild-config-o…
kennytm Oct 19, 2017
44e882c
Rollup merge of #45375 - topecongiro:enable-tilde, r=Mark-Simulacrum
kennytm Oct 19, 2017
3477715
Rollup merge of #45376 - topecongiro:fix-typos-in-readme, r=Mark-Simu…
kennytm Oct 19, 2017
dd41422
Rollup merge of #45377 - topecongiro:fix-typos/librustc-ty-README, r=…
kennytm Oct 19, 2017
4371862
Rollup merge of #45382 - Keruspe:master, r=Mark-Simulacrum
kennytm Oct 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def program_config(self, program):
"""
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()))

Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
8 changes: 4 additions & 4 deletions src/ci/docker/asmjs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
28 changes: 14 additions & 14 deletions src/ci/docker/cross2/build-solaris-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/liballoc/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions src/librustc/ty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.).

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/macro-expanded-include/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/asm-concat-src.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// pretty-expanded FIXME #23616
// ignore-emscripten
// ignore-emscripten no asm

#![feature(asm)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/command-before-exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/command-exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/core-run-destroy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/env-args-reverse-iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/env-funky-keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// ignore-android
// ignore-windows
// ignore-emscripten
// ignore-emscripten no execve
// no-prefer-dynamic

#![feature(libc)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/env-home-dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/extern-pass-empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/fds-are-cloexec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// ignore-windows
// ignore-android
// ignore-emscripten
// ignore-emscripten no processes
// ignore-haiku

#![feature(libc)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/format-no-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/generator/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/i128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-10626.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/issue-13304.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-14456.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-14940.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-16272.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/issue-20091.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-2190-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// pretty-expanded FIXME #23616
// ignore-emscripten
// ignore-emscripten no threads

use std::thread::Builder;

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-24313.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-28950.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/issue-29485.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// except according to those terms.

// aux-build:issue-29485.rs
// ignore-emscripten
// ignore-emscripten no threads

#[feature(recover)]

Expand Down
Loading