]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoFix intrinsics and expand tests
est31 [Thu, 24 Nov 2016 23:08:40 +0000 (00:08 +0100)]
Fix intrinsics and expand tests

7 years agoMake rustdoc aware of the primitive i128 type
est31 [Mon, 21 Nov 2016 04:40:35 +0000 (05:40 +0100)]
Make rustdoc aware of the primitive i128 type

Many thanks to ollie27 for spotting all the places.

7 years agoCompilation fixes
est31 [Sun, 20 Nov 2016 05:44:56 +0000 (06:44 +0100)]
Compilation fixes

7 years agoUse LLVMRustConstInt128Get on stage1 too
est31 [Sun, 20 Nov 2016 04:06:53 +0000 (05:06 +0100)]
Use LLVMRustConstInt128Get on stage1 too

llvm::LLVMConstIntGetZExtValue doesn't accept values with more than 64 bits.

This fixes an LLVM assertion error when compiling libcore with stage1:

src/llvm/include/llvm/ADT/APInt.h:1336:
uint64_t llvm::APInt::getZExtValue() const:
Assertion `getActiveBits() <= 64 && "Too many bits for uint64_t"' failed.

7 years agoFix rebase fallout
est31 [Sun, 20 Nov 2016 00:26:51 +0000 (01:26 +0100)]
Fix rebase fallout

7 years agoWIP intrinsics
Simonas Kazlauskas [Sun, 2 Oct 2016 20:01:57 +0000 (23:01 +0300)]
WIP intrinsics

7 years agoFix rebase fallout
Simonas Kazlauskas [Tue, 27 Sep 2016 16:06:44 +0000 (19:06 +0300)]
Fix rebase fallout

This commit includes manual merge conflict resolution changes from a rebase by @est31.

7 years agoFix i128 alignment calculation
Simonas Kazlauskas [Tue, 27 Sep 2016 13:22:02 +0000 (16:22 +0300)]
Fix i128 alignment calculation

7 years agoImplement emit_iu128 for json serialiser
Simonas Kazlauskas [Sat, 27 Aug 2016 21:59:14 +0000 (00:59 +0300)]
Implement emit_iu128 for json serialiser

Causes ICEs otherwise while trying to dump AST

7 years agoAdd a way to retrieve constant value in 128 bits
Simonas Kazlauskas [Thu, 25 Aug 2016 22:32:46 +0000 (01:32 +0300)]
Add a way to retrieve constant value in 128 bits

Fixes rebase fallout, makes code correct in presence of 128-bit constants.

This commit includes manual merge conflict resolution changes from a rebase by @est31.

7 years agoimpl Step for iu128
Simonas Kazlauskas [Wed, 24 Aug 2016 23:16:21 +0000 (02:16 +0300)]
impl Step for iu128

Also fix the leb128 tests

7 years agoFix parse-fail and compile-fail tests
Simonas Kazlauskas [Wed, 24 Aug 2016 19:38:14 +0000 (22:38 +0300)]
Fix parse-fail and compile-fail tests

7 years agoWrapping<i128> and attempt at LLVM 3.7 compat
Simonas Kazlauskas [Wed, 24 Aug 2016 16:29:15 +0000 (19:29 +0300)]
Wrapping<i128> and attempt at LLVM 3.7 compat

This commit includes manual merge conflict resolution changes from a rebase by @est31.

7 years agoMakefiles support for rustc_i128 crate
Simonas Kazlauskas [Wed, 24 Aug 2016 13:48:35 +0000 (16:48 +0300)]
Makefiles support for rustc_i128 crate

This commit includes manual merge conflict resolution changes from a rebase by @est31.

7 years agoTidy
Simonas Kazlauskas [Wed, 24 Aug 2016 13:10:38 +0000 (16:10 +0300)]
Tidy

This commit includes manual merge conflict resolution changes from a rebase by @est31.

7 years agoFix LEB128 to work with the stage1
Simonas Kazlauskas [Wed, 24 Aug 2016 12:58:40 +0000 (15:58 +0300)]
Fix LEB128 to work with the stage1

Stage 1 can’t really handle negative 128-bit literals, but an equivalent bit-not is fine

7 years agoCleanup FIXMEs
Simonas Kazlauskas [Tue, 23 Aug 2016 23:37:19 +0000 (02:37 +0300)]
Cleanup FIXMEs

7 years agoFeature gate the 128 bit types
Simonas Kazlauskas [Tue, 23 Aug 2016 23:15:15 +0000 (02:15 +0300)]
Feature gate the 128 bit types

Dangling a carrot in front of a donkey.

This commit includes manual merge conflict resolution changes from a rebase by @est31.

7 years agoTests for the 128 bit integers
Simonas Kazlauskas [Tue, 23 Aug 2016 21:59:16 +0000 (00:59 +0300)]
Tests for the 128 bit integers

7 years agoSuch large. Very 128. Much bits.
Simonas Kazlauskas [Tue, 23 Aug 2016 00:56:52 +0000 (03:56 +0300)]
Such large. Very 128. Much bits.

This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which
understands and supports 128-bit integers throughout.

The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to
iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported,
this strategy is good enough to get past the first bootstrap stages to end up with a fully working
128-bit capable compiler.

In order for this strategy to work, number of locations had to be changed to use associated
max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?)
had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works
(former not necessarily producing the right results in stage1).

This commit includes manual merge conflict resolution changes from a rebase by @est31.

7 years agoAuto merge of #38697 - alexcrichton:rollup, r=alexcrichton
bors [Fri, 30 Dec 2016 07:34:19 +0000 (07:34 +0000)]
Auto merge of #38697 - alexcrichton:rollup, r=alexcrichton

Rollup of 25 pull requests

- Successful merges: #37149, #38491, #38517, #38559, #38587, #38609, #38611, #38622, #38628, #38630, #38631, #38632, #38635, #38647, #38649, #38655, #38659, #38660, #38662, #38665, #38671, #38674, #38676, #38693, #38695
- Failed merges: #38657, #38680

7 years agoA few small test fixes and such from rollup
Alex Crichton [Fri, 30 Dec 2016 02:17:31 +0000 (18:17 -0800)]
A few small test fixes and such from rollup

7 years agoMerge branch 'aux-tests' of https://github.com/alexcrichton/rust into rollup
Alex Crichton [Fri, 30 Dec 2016 01:29:32 +0000 (17:29 -0800)]
Merge branch 'aux-tests' of https://github.com/alexcrichton/rust into rollup

7 years agoMerge branch 'rustbuild-llvm-targets' of https://github.com/xen0n/rust into rollup
Alex Crichton [Fri, 30 Dec 2016 01:28:19 +0000 (17:28 -0800)]
Merge branch 'rustbuild-llvm-targets' of https://github.com/xen0n/rust into rollup

7 years agoRollup merge of #38695 - alexcrichton:debug-appveyor, r=brson
Alex Crichton [Fri, 30 Dec 2016 01:26:41 +0000 (17:26 -0800)]
Rollup merge of #38695 - alexcrichton:debug-appveyor, r=brson

appveyor: Attempt to debug flaky test runs

This commit is an attempt to debug #38620 since we're unable to reproduce it
locally. It follows the [advice] of those with AppVeyor to use the `handle.exe`
tool to try to debug what processes have a handle to the file open.

This won't be guaranteed to actually help us, but hopefully it'll diagnose
something at some point?

[advice]: http://help.appveyor.com/discussions/questions/2898

7 years agoRollup merge of #38693 - lucis-fluxum:partialord-typo-fix, r=steveklabnik
Alex Crichton [Fri, 30 Dec 2016 01:26:40 +0000 (17:26 -0800)]
Rollup merge of #38693 - lucis-fluxum:partialord-typo-fix, r=steveklabnik

Fix typo in PartialOrd docs

7 years agoRollup merge of #38676 - rkruppe:llvm-check-success, r=alexcrichton
Alex Crichton [Fri, 30 Dec 2016 01:26:39 +0000 (17:26 -0800)]
Rollup merge of #38676 - rkruppe:llvm-check-success, r=alexcrichton

Check *all* errors in LLVMRustArchiveIterator* API

Incrementing the `Archive::child_iterator` fetches and validates the next child.
This can trigger an error, which we previously checked on the *next* call to `LLVMRustArchiveIteratorNext()`.
This means we ignore the last error if we stop iterating halfway through.
This is harmless (we don't access the child, after all) but LLVM 4.0 calls `abort()` if *any* error goes unchecked, even a success value.
This means that basically any rustc invocation that opens an archive and searches through it would die.

The solution implemented here is to change the order of operations, such that
advancing the iterator and fetching the newly-validated iterator happens in the same `Next()` call.
This keeps the error handling behavior as before but ensures all `Error`s get checked.

7 years agoRollup merge of #38674 - GuillaumeGomez:atomic_fn_docs, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:38 +0000 (17:26 -0800)]
Rollup merge of #38674 - GuillaumeGomez:atomic_fn_docs, r=frewsxcv

Add missing urls for atomic fn docs

r? @frewsxcv

7 years agoRollup merge of #38671 - ollie27:rustdoc_stab_em_div_fix, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:36 +0000 (17:26 -0800)]
Rollup merge of #38671 - ollie27:rustdoc_stab_em_div_fix, r=frewsxcv

rustdoc: Fix broken CSS for trait items

The `stab` class shouldn't have any effect here so can be removed as currently it adds an outline.

This was accidentally caused by #38329.

[before](https://doc.rust-lang.org/nightly/std/iter/trait.ExactSizeIterator.html) [after](https://ollie27.github.io/rust_doc_test/std/iter/trait.ExactSizeIterator.html)

7 years agoRollup merge of #38665 - alexcrichton:pretty-only-host, r=brson
Alex Crichton [Fri, 30 Dec 2016 01:26:35 +0000 (17:26 -0800)]
Rollup merge of #38665 - alexcrichton:pretty-only-host, r=brson

rustbuild: Move pretty test suites to host-only

In an ongoing effort to optimize the runtime of the Android cross builder this
commit updates the pretty test suites to run only for host platforms, not for
target platforms as well. This means we'll still keep running all the suites but
we'll only run them for configured hosts, not for configured targets. This
notably means that we won't be running these suites on Android or musl targets,
for example.

7 years agoRollup merge of #38662 - agl:patch-2, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:34 +0000 (17:26 -0800)]
Rollup merge of #38662 - agl:patch-2, r=frewsxcv

Use "an" before "i32"

(Minor typo fix.)

Since the word `i32` starts with a vowel, the indefinite article should use "an", not "a" \[[1](http://www.dictionary.com/browse/an)\]. (Previously there was one instance of "an i32" and two instances of "a i32", so at least something is wrong!) Since I believe that "an" is the correct form, I aligned everything with that.

7 years agoRollup merge of #38660 - martijnvermaat:terminfo-reset-typo, r=alexcrichton
Alex Crichton [Fri, 30 Dec 2016 01:26:34 +0000 (17:26 -0800)]
Rollup merge of #38660 - martijnvermaat:terminfo-reset-typo, r=alexcrichton

Fix default terminfo code for reset (sg0 -> sgr0)

Resetting the terminal should first try `sgr0` (as per the comment), not
`sg0` which I believe to be a typo.

This will at least fix rustc output in Emacs terminals (e.g., ansi-term)
with `TERM=eterm-color` which does not provide the next fallback `sgr`. In
such a terminal, the final fallback `op` (`\e[39;49`) is used  which
resets only colors, not all attributes. This causes all text to be
printed in bold from the first string printed in bold by rustc onwards,
including the terminal prompt and the output from all following commands.

The typo seems to have been introduced by #29999

7 years agoRollup merge of #38659 - agl:patch-1, r=apasel422
Alex Crichton [Fri, 30 Dec 2016 01:26:33 +0000 (17:26 -0800)]
Rollup merge of #38659 - agl:patch-1, r=apasel422

Add missing apostrophe.

(Minor typo fix.)

The "support" in this case is possessed by the "programmer", and that ownership should be indicated by an apostrophe.

7 years agoRollup merge of #38655 - alexcrichton:travis-and-then, r=brson
Alex Crichton [Fri, 30 Dec 2016 01:26:31 +0000 (17:26 -0800)]
Rollup merge of #38655 - alexcrichton:travis-and-then, r=brson

travis: Use `&&` intead of `;`

Show errors sooner and try not to hide them behind lots of other walls of text.

7 years agoRollup merge of #38649 - GuillaumeGomez:atomicint_docs, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:30 +0000 (17:26 -0800)]
Rollup merge of #38649 - GuillaumeGomez:atomicint_docs, r=frewsxcv

Add missing urls for atomic_int macros types

r? @frewsxcv

7 years agoRollup merge of #38647 - alexcrichton:faster-android, r=brson
Alex Crichton [Fri, 30 Dec 2016 01:26:29 +0000 (17:26 -0800)]
Rollup merge of #38647 - alexcrichton:faster-android, r=brson

compiletest: Don't limit all suites on Android

On Android we only have one test thread for supposed problems with concurrency
and the remote debugger. Not all of our suites require one concurrency, however,
and suites like compile-fail or pretty can be much faster if they're
parallelized on Travis.

This commit only sets the test threads to one on Android for suites which
actually run code, and other suites aren't tampered with.

7 years agoRollup merge of #38635 - GuillaumeGomez:atomicptr_docs, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:28 +0000 (17:26 -0800)]
Rollup merge of #38635 - GuillaumeGomez:atomicptr_docs, r=frewsxcv

Add missing urls for AtomicPtr

r? @frewsxcv

7 years agoRollup merge of #38632 - alexcrichton:trim-travis, r=japaric
Alex Crichton [Fri, 30 Dec 2016 01:26:26 +0000 (17:26 -0800)]
Rollup merge of #38632 - alexcrichton:trim-travis, r=japaric

Trim down Travis docker images slightly

Two things we no longer need:

* ccache, we now use sccache
* A `/tmp/obj` dir no longer used

7 years agoRollup merge of #38631 - alexcrichton:supafast, r=brson
Alex Crichton [Fri, 30 Dec 2016 01:26:25 +0000 (17:26 -0800)]
Rollup merge of #38631 - alexcrichton:supafast, r=brson

rustbuild: Compile rustc twice, not thrice

This commit switches the rustbuild build system to compiling the
compiler twice for a normal bootstrap rather than the historical three
times.

Rust is a bootstrapped language which means that a previous version of
the compiler is used to build the next version of the compiler. Over
time, however, we change many parts of compiler artifacts such as the
metadata format, symbol names, etc. These changes make artifacts from
one compiler incompatible from another compiler. Consequently if a
compiler wants to be able to use some artifacts then it itself must have
compiled the artifacts.

Historically the rustc build system has achieved this by compiling the
compiler three times:

* An older compiler (stage0) is downloaded to kick off the chain.
* This compiler now compiles a new compiler (stage1)
* The stage1 compiler then compiles another compiler (stage2)
* Finally, the stage2 compiler needs libraries to link against, so it
  compiles all the libraries again.

This entire process amounts in compiling the compiler three times.
Additionally, this process always guarantees that the Rust source tree
can compile itself because the stage2 compiler (created by a freshly
created compiler) would successfully compile itself again. This
property, ensuring Rust can compile itself, is quite important!

In general, though, this third compilation is not required for general
purpose development on the compiler. The third compiler (stage2) can
reuse the libraries that were created during the second compile. In
other words, the second compilation can produce both a compiler and the
libraries that compiler will use. These artifacts *must* be compatible
due to the way plugins work today anyway, and they were created by the
same source code so they *should* be compatible as well.

So given all that, this commit switches the default build process to
only compile the compiler two times, avoiding this third compilation
by copying artifacts from the previous one. Along the way a new entry in
the Travis matrix was also added to ensure that our full bootstrap can
succeed. This entry does not run tests, though, as it should not be
necessary.

To restore the old behavior of a full bootstrap (three compiles) you can
either pass:

    ./configure --enable-full-bootstrap

or if you're using config.toml:

    [build]
    full-bootstrap = true

Overall this will hopefully be an easy 33% win in build times of the
compiler. If we do 33% less work we should be 33% faster! This in turn
should affect cycle times and such on Travis and AppVeyor positively as
well as making it easier to work on the compiler itself.

7 years agoRollup merge of #38630 - frewsxcv:variadic, r=steveklabnik
Alex Crichton [Fri, 30 Dec 2016 01:26:24 +0000 (17:26 -0800)]
Rollup merge of #38630 - frewsxcv:variadic, r=steveklabnik

Document foreign variadic functions in TRPL and the reference.

Fixes https://github.com/rust-lang/rust/issues/38485.

7 years agoRollup merge of #38628 - kellerkindt:patch-1, r=steveklabnik
Alex Crichton [Fri, 30 Dec 2016 01:26:22 +0000 (17:26 -0800)]
Rollup merge of #38628 - kellerkindt:patch-1, r=steveklabnik

And suddenly a german word :O

"verboten" is german for "forbidden"

7 years agoRollup merge of #38622 - alexcrichton:read-lengths, r=sfackler
Alex Crichton [Fri, 30 Dec 2016 01:26:21 +0000 (17:26 -0800)]
Rollup merge of #38622 - alexcrichton:read-lengths, r=sfackler

std: Clamp max read/write sizes on Unix

Turns out that even though all these functions take a `size_t` they don't
actually work that well with anything larger than the maximum value of
`ssize_t`, the return value. Furthermore it looks like OSX rejects any
read/write requests larger than `INT_MAX - 1`. Handle all these cases by just
clamping the maximum size of a read/write on Unix to a platform-specific value.

Closes #38590

7 years agoRollup merge of #38611 - GuillaumeGomez:atomicbool_docs, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:20 +0000 (17:26 -0800)]
Rollup merge of #38611 - GuillaumeGomez:atomicbool_docs, r=frewsxcv

Add missing urls in AtomicBool docs

r? @frewsxcv

7 years agoRollup merge of #38609 - alexcrichton:less-compress, r=japaric
Alex Crichton [Fri, 30 Dec 2016 01:26:19 +0000 (17:26 -0800)]
Rollup merge of #38609 - alexcrichton:less-compress, r=japaric

travis: Don't use -9 on gzip

I timed this locally and plain old `gzip` took 2m06s while `gzip -9` took a
whopping 6m23s to save a mere 4MB out of 1.2GB. Let's shave a few minutes off
the Android builder by turning down the compression level.

7 years agoRollup merge of #38587 - GuillaumeGomez:arc_docs, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:18 +0000 (17:26 -0800)]
Rollup merge of #38587 - GuillaumeGomez:arc_docs, r=frewsxcv

Add missing urls in Arc docs

r? @frewsxcv

7 years agoRollup merge of #38559 - japaric:ptx2, r=alexcrichton
Alex Crichton [Fri, 30 Dec 2016 01:26:15 +0000 (17:26 -0800)]
Rollup merge of #38559 - japaric:ptx2, r=alexcrichton

PTX support, take 2

- You can generate PTX using `--emit=asm` and the right (custom) target. Which
  then you can run on a NVIDIA GPU.

- You can compile `core` to PTX. [Xargo] also works and it can compile some
  other crates like `collections` (but I doubt all of those make sense on a GPU)

[Xargo]: https://github.com/japaric/xargo

- You can create "global" functions, which can be "called" by the host, using
  the `"ptx-kernel"` ABI, e.g. `extern "ptx-kernel" fn kernel() { .. }`. Every
  other function is a "device" function and can only be called by the GPU.

- Intrinsics like `__syncthreads()` and `blockIdx.x` are available as
  `"platform-intrinsics"`. These intrinsics are *not* in the `core` crate but
  any Rust user can create "bindings" to them using an `extern
  "platform-intrinsics"` block. See example at the end.

- Trying to emit PTX with `-g` (debuginfo); you get an LLVM error. But I don't
  think PTX can contain debuginfo anyway so `-g` should be ignored and a warning
  should be printed ("`-g` doesn't work with this target" or something).

- "Single source" support. You *can't* write a single source file that contains
  both host and device code. I think that should be possible to implement that
  outside the compiler using compiler plugins / build scripts.

- The equivalent to CUDA `__shared__` which it's used to declare memory that's
  shared between the threads of the same block. This could be implemented using
  attributes: `#[shared] static mut SCRATCH_MEMORY: [f32; 64]` but hasn't been
  implemented yet.

- Built-in targets. This PR doesn't add targets to the compiler just yet but one
  can create custom targets to be able to emit PTX code (see the example at the
  end). The idea is to have people experiment with this feature before
  committing to it (built-in targets are "insta-stable")

- All functions must be "inlined". IOW, the `.rlib` must always contain the LLVM
  bitcode of all the functions of the crate it was produced from. Otherwise, you
  end with "undefined references" in the final PTX code but you won't get *any*
  linker error because no linker is involved. IOW, you'll hit a runtime error
  when loading the PTX into the GPU. The workaround is to use `#[inline]` on
  non-generic functions and to never use `#[inline(never)]` but this may not
  always be possible because e.g. you could be relying on third party code.

- Should `--emit=asm` generate a `.ptx` file instead of a `.s` file?

TL;DR Use Xargo to turn a crate into a PTX module (a `.s` file). Then pass that
PTX module, as a string, to the GPU and run it.

The full code is in [this repository]. This section gives an overview of how to
run Rust code on a NVIDIA GPU.

[this repository]: https://github.com/japaric/cuda

- Create a custom target. Here's the 64-bit NVPTX target (NOTE: the comments
  are not valid because this is supposed to be a JSON file; remove them before
  you use this file):

``` js
// nvptx64-nvidia-cuda.json
{
  "arch": "nvptx64",  // matches LLVM
  "cpu": "sm_20",  // "oldest" compute capability supported by LLVM
  "data-layout": "e-i64:64-v16:16-v32:32-n16:32:64",
  "llvm-target": "nvptx64-nvidia-cuda",
  "max-atomic-width": 0,  // LLVM errors with any other value :-(
  "os": "cuda",  // matches LLVM
  "panic-strategy": "abort",
  "target-endian": "little",
  "target-pointer-width": "64",
  "target-vendor": "nvidia",  // matches LLVM -- not required
}
```

(There's a 32-bit target specification in the linked repository)

- Write a kernel

``` rust

extern "platform-intrinsic" {
    fn nvptx_block_dim_x() -> i32;
    fn nvptx_block_idx_x() -> i32;
    fn nvptx_thread_idx_x() -> i32;
}

/// Copies an array of `n` floating point numbers from `src` to `dst`
pub unsafe extern "ptx-kernel" fn memcpy(dst: *mut f32,
                                         src: *const f32,
                                         n: usize) {
    let i = (nvptx_block_dim_x() as isize)
        .wrapping_mul(nvptx_block_idx_x() as isize)
        .wrapping_add(nvptx_thread_idx_x() as isize);

    if (i as usize) < n {
        *dst.offset(i) = *src.offset(i);
    }
}
```

- Emit PTX code

```
$ xargo rustc --target nvptx64-nvidia-cuda --release -- --emit=asm
   Compiling core v0.0.0 (file://..)
   (..)
   Compiling nvptx-builtins v0.1.0 (https://github.com/japaric/nvptx-builtins)
   Compiling kernel v0.1.0

$ cat target/nvptx64-nvidia-cuda/release/deps/kernel-*.s
//
// Generated by LLVM NVPTX Back-End
//

.version 3.2
.target sm_20
.address_size 64

        // .globl       memcpy

.visible .entry memcpy(
        .param .u64 memcpy_param_0,
        .param .u64 memcpy_param_1,
        .param .u64 memcpy_param_2
)
{
        .reg .pred      %p<2>;
        .reg .s32       %r<5>;
        .reg .s64       %rd<12>;

        ld.param.u64    %rd7, [memcpy_param_2];
        mov.u32 %r1, %ntid.x;
        mov.u32 %r2, %ctaid.x;
        mul.wide.s32    %rd8, %r2, %r1;
        mov.u32 %r3, %tid.x;
        cvt.s64.s32     %rd9, %r3;
        add.s64         %rd10, %rd9, %rd8;
        setp.ge.u64     %p1, %rd10, %rd7;
        @%p1 bra        LBB0_2;
        ld.param.u64    %rd3, [memcpy_param_0];
        ld.param.u64    %rd4, [memcpy_param_1];
        cvta.to.global.u64      %rd5, %rd4;
        cvta.to.global.u64      %rd6, %rd3;
        shl.b64         %rd11, %rd10, 2;
        add.s64         %rd1, %rd6, %rd11;
        add.s64         %rd2, %rd5, %rd11;
        ld.global.u32   %r4, [%rd2];
        st.global.u32   [%rd1], %r4;
LBB0_2:
        ret;
}
```

- Run it on the GPU

``` rust
// `kernel.ptx` is the `*.s` file we got in the previous step
const KERNEL: &'static str = include_str!("kernel.ptx");

driver::initialize()?;

let device = Device(0)?;
let ctx = device.create_context()?;
let module = ctx.load_module(KERNEL)?;
let kernel = module.function("memcpy")?;

let h_a: Vec<f32> = /* create some random data */;
let h_b = vec![0.; N];

let d_a = driver::allocate(bytes)?;
let d_b = driver::allocate(bytes)?;

// Copy from host to GPU
driver::copy(h_a, d_a)?;

// Run `memcpy` on the GPU
kernel.launch(d_b, d_a, N)?;

// Copy from GPU to host
driver::copy(d_b, h_b)?;

// Verify
assert_eq!(h_a, h_b);

// `d_a`, `d_b`, `h_a`, `h_b` are dropped/freed here
```

---

cc @alexcrichton @brson @rkruppe

> What has changed since #34195?

- `core` now can be compiled into PTX. Which makes it very easy to turn `no_std`
  crates into "kernels" with the help of Xargo.

- There's now a way, the `"ptx-kernel"` ABI, to generate "global" functions. The
  old PR required a manual step (it was hack) to "convert" "device" functions
  into "global" functions. (Only "global" functions can be launched by the host)

- Everything is unstable. There are not "insta stable" built-in targets this
  time (\*). The users have to use a custom target to experiment with this
  feature. Also, PTX instrinsics, like `__syncthreads` and `blockIdx.x`, are now
  implemented as `"platform-intrinsics"` so they no longer live in the `core`
  crate.

(\*) I'd actually like to have in-tree targets because that makes this target
more discoverable, removes the need to lug around .json files, etc.

However, bundling a target with the compiler immediately puts it in the path
towards stabilization. Which gives us just two cycles to find and fix any
problem with the target specification. Afterwards, it becomes hard to tweak
the specification because that could be a breaking change.

A possible solution could be "unstable built-in targets". Basically, to use an
unstable target, you'll have to also pass `-Z unstable-options` to the compiler.
And unstable targets, being unstable, wouldn't be available on stable.

> Why should this be merged?

- To let people experiment with the feature out of tree. Having easy access to
  the feature (in every nightly) allows this. I also think that, as it is, it
  should be possible to start prototyping type-safe single source support using
  build scripts, macros and/or plugins.

- It's a straightforward implementation. No different that adding support for
  any other architecture.

7 years agoRollup merge of #38517 - frewsxcv:clarify-msys2-dependencies, r=alexcrichton
Alex Crichton [Fri, 30 Dec 2016 01:26:14 +0000 (17:26 -0800)]
Rollup merge of #38517 - frewsxcv:clarify-msys2-dependencies, r=alexcrichton

Clarify phrasing of MSYS2 dependencies in README.md.

Fixes https://github.com/rust-lang/rust/issues/36115.

7 years agoRollup merge of #38491 - GuillaumeGomez:builder_docs, r=frewsxcv
Alex Crichton [Fri, 30 Dec 2016 01:26:13 +0000 (17:26 -0800)]
Rollup merge of #38491 - GuillaumeGomez:builder_docs, r=frewsxcv

Builder docs

r? @frewsxcv

7 years agoRollup merge of #37149 - edunham:more-cargotest, r=alexcrichton
Alex Crichton [Fri, 30 Dec 2016 01:26:12 +0000 (17:26 -0800)]
Rollup merge of #37149 - edunham:more-cargotest, r=alexcrichton

Add some more repos to cargotest

From suggestions at https://users.rust-lang.org/t/what-stable-rust-applications-do-you-use-frequently/7618

This adds some applications which use stable Rust and come with their own lockfiles in their respective trees.

ripgrep, xsv, and bins have 33 unique dependencies between them.

I alphabetized the list by project name because that seems tidier.

r? @brson

7 years agoAuto merge of #38695 - alexcrichton:debug-appveyor, r=brson
bors [Fri, 30 Dec 2016 01:20:18 +0000 (01:20 +0000)]
Auto merge of #38695 - alexcrichton:debug-appveyor, r=brson

appveyor: Attempt to debug flaky test runs

This commit is an attempt to debug #38620 since we're unable to reproduce it
locally. It follows the [advice] of those with AppVeyor to use the `handle.exe`
tool to try to debug what processes have a handle to the file open.

This won't be guaranteed to actually help us, but hopefully it'll diagnose
something at some point?

[advice]: http://help.appveyor.com/discussions/questions/2898

7 years agoappveyor: Attempt to debug flaky test runs
Alex Crichton [Thu, 29 Dec 2016 23:58:57 +0000 (15:58 -0800)]
appveyor: Attempt to debug flaky test runs

This commit is an attempt to debug #38620 since we're unable to reproduce it
locally. It follows the [advice] of those with AppVeyor to use the `handle.exe`
tool to try to debug what processes have a handle to the file open.

This won't be guaranteed to actually help us, but hopefully it'll diagnose
something at some point?

[advice]: http://help.appveyor.com/discussions/questions/2898

7 years agoFix typo in PartialOrd docs
Luc Street [Thu, 29 Dec 2016 22:21:07 +0000 (14:21 -0800)]
Fix typo in PartialOrd docs

7 years agoCheck *all* errors in LLVMRustArchiveIterator* API
Robin Kruppe [Thu, 29 Dec 2016 15:55:29 +0000 (16:55 +0100)]
Check *all* errors in LLVMRustArchiveIterator* API

Incrementing the `Archive::child_iterator` fetches and validates the next child.
This can trigger an error, which we previously checked on the *next* call to `LLVMRustArchiveIteratorNext()`.
This means we ignore the last error if we stop iterating halfway through.
This is harmless (we don't access the child, after all) but LLVM 4.0 calls `abort()` if *any* error goes unchecked, even a success value.
This means that basically any rustc invocation that opens an archive and searches through it would die.

The solution implemented here is to change the order of operations, such that
advancing the iterator and fetching the newly-validated iterator happens in the same `Next()` call.
This keeps the error handling behavior as before but ensures all `Error`s get checked.

7 years agoAuto merge of #38503 - brson:bootstrap, r=alexcrichton
bors [Thu, 29 Dec 2016 19:34:23 +0000 (19:34 +0000)]
Auto merge of #38503 - brson:bootstrap, r=alexcrichton

Bump bootstrap compiler

r? @alexcrichton

I'm not clear on whether cargo will need to additionally be bumped beyond what's in https://github.com/rust-lang/rust/pull/38470

7 years agorustbuild: Don't run pretty tests by default
Alex Crichton [Thu, 29 Dec 2016 17:55:16 +0000 (09:55 -0800)]
rustbuild: Don't run pretty tests by default

This commit relegates all pretty tests to not get run by default and rather get
run as part of an "aux" test suite. This "aux" suite is renamed from the old
"cargotest" suite to just collect tests that don't need to run everywhere but
should at least pass on Unix/Windows.

7 years agoFixes for new cargo test repos
Alex Crichton [Thu, 29 Dec 2016 16:52:31 +0000 (08:52 -0800)]
Fixes for new cargo test repos

* Update to ripgrep HEAD because the previous rev would still change the lock
  file when `cargo build` was issued.
* Remove `bins` as it depends on OpenSSL on Windows, which won't work on our
  bots
* Update rev of tokei to get a rev that doesn't change the lockfile

7 years agoAdd some more repos to cargotest
E. Dunham [Thu, 13 Oct 2016 17:58:19 +0000 (10:58 -0700)]
Add some more repos to cargotest

From suggestions at https://users.rust-lang.org/t/what-stable-rust-applications-do-you-use-frequently/7618

This adds some applications which use stable Rust and come with their own
lockfiles in tree.

ripgrep, xsv, and bins have 33 unique dependencies between them.

7 years agoFallout from updating bootstrap Cargo
Alex Crichton [Thu, 29 Dec 2016 04:13:10 +0000 (20:13 -0800)]
Fallout from updating bootstrap Cargo

7 years agoBump bootstrap compiler
Brian Anderson [Tue, 20 Dec 2016 22:40:46 +0000 (22:40 +0000)]
Bump bootstrap compiler

7 years agoAuto merge of #38627 - rkruppe:ninja-build, r=alexcrichton
bors [Thu, 29 Dec 2016 13:48:50 +0000 (13:48 +0000)]
Auto merge of #38627 - rkruppe:ninja-build, r=alexcrichton

Accept ninja-build binary in place of ninja

See comment in the diff for rationale.

r? @alexcrichton

7 years agoAuto merge of #38571 - nrc:emit-metadata-change, r=alexcrichton
bors [Thu, 29 Dec 2016 11:01:11 +0000 (11:01 +0000)]
Auto merge of #38571 - nrc:emit-metadata-change, r=alexcrichton

Change --crate-type metadata to --emit=metadata

WIP

7 years agoAdd missing urls for atomic fn docs
Guillaume Gomez [Thu, 29 Dec 2016 10:31:16 +0000 (11:31 +0100)]
Add missing urls for atomic fn docs

7 years agoAuto merge of #38645 - nikomatsakis:incr-comp-fix-time-depth, r=nrc
bors [Thu, 29 Dec 2016 08:16:58 +0000 (08:16 +0000)]
Auto merge of #38645 - nikomatsakis:incr-comp-fix-time-depth, r=nrc

propagate TIME_DEPTH to the helper threads for -Z time-passes

Currently, the timing measurements for LLVM passes and the like don't come out indented, which messes up `perf.rust-lang.org`.

r? @nrc

7 years agoSupport --emit=foo,metadata
Nick Cameron [Thu, 29 Dec 2016 00:23:38 +0000 (13:23 +1300)]
Support --emit=foo,metadata

7 years agoAuto merge of #38619 - alexcrichton:less-android-flaky, r=brson
bors [Thu, 29 Dec 2016 02:44:28 +0000 (02:44 +0000)]
Auto merge of #38619 - alexcrichton:less-android-flaky, r=brson

travis: Attempt to fix Android flakiness

There's been some flaky runs on Travis where the Android emulator is having
problems staying alive... presumably? For example:

* https://travis-ci.org/rust-lang/rust/jobs/186736745

This commit spawns the emulator in the same way as buildbot with `nohup` to hope
that it goes into the background successfully, followed by a `wait-for-device`
command. I'm not actually sure if this'll fix the problems we're seeing, but I
figure it can't hurt to test out.

7 years agorustdoc: Fix broken CSS for trait items
Oliver Middleton [Thu, 29 Dec 2016 02:23:49 +0000 (02:23 +0000)]
rustdoc: Fix broken CSS for trait items

7 years agoRestore --crate-type=metadata as an alias for --crate-type=rlib,--emit=metadata ...
Nick Cameron [Tue, 27 Dec 2016 21:12:11 +0000 (10:12 +1300)]
Restore --crate-type=metadata as an alias for --crate-type=rlib,--emit=metadata + a warning

7 years agoAdd a test for #38273
Nick Cameron [Tue, 27 Dec 2016 20:35:48 +0000 (09:35 +1300)]
Add a test for #38273

Closes 38273

7 years agoChange --crate-type metadata to --emit=metadata
Nick Cameron [Fri, 23 Dec 2016 06:39:20 +0000 (19:39 +1300)]
Change --crate-type metadata to --emit=metadata

7 years agorustbuild: Move pretty test suites to host-only
Alex Crichton [Wed, 28 Dec 2016 23:05:17 +0000 (15:05 -0800)]
rustbuild: Move pretty test suites to host-only

In an ongoing effort to optimize the runtime of the Android cross builder this
commit updates the pretty test suites to run only for host platforms, not for
target platforms as well. This means we'll still keep running all the suites but
we'll only run them for configured hosts, not for configured targets. This
notably means that we won't be running these suites on Android or musl targets,
for example.

7 years agorustbuild: Compile rustc twice, not thrice
Alex Crichton [Sun, 25 Dec 2016 23:20:33 +0000 (15:20 -0800)]
rustbuild: Compile rustc twice, not thrice

This commit switches the rustbuild build system to compiling the
compiler twice for a normal bootstrap rather than the historical three
times.

Rust is a bootstrapped language which means that a previous version of
the compiler is used to build the next version of the compiler. Over
time, however, we change many parts of compiler artifacts such as the
metadata format, symbol names, etc. These changes make artifacts from
one compiler incompatible from another compiler. Consequently if a
compiler wants to be able to use some artifacts then it itself must have
compiled the artifacts.

Historically the rustc build system has achieved this by compiling the
compiler three times:

* An older compiler (stage0) is downloaded to kick off the chain.
* This compiler now compiles a new compiler (stage1)
* The stage1 compiler then compiles another compiler (stage2)
* Finally, the stage2 compiler needs libraries to link against, so it
  compiles all the libraries again.

This entire process amounts in compiling the compiler three times.
Additionally, this process always guarantees that the Rust source tree
can compile itself because the stage2 compiler (created by a freshly
created compiler) would successfully compile itself again. This
property, ensuring Rust can compile itself, is quite important!

In general, though, this third compilation is not required for general
purpose development on the compiler. The third compiler (stage2) can
reuse the libraries that were created during the second compile. In
other words, the second compilation can produce both a compiler and the
libraries that compiler will use. These artifacts *must* be compatible
due to the way plugins work today anyway, and they were created by the
same source code so they *should* be compatible as well.

So given all that, this commit switches the default build process to
only compile the compiler three times, avoiding this third compilation
by copying artifacts from the previous one. Along the way a new entry in
the Travis matrix was also added to ensure that our full bootstrap can
succeed. This entry does not run tests, though, as it should not be
necessary.

To restore the old behavior of a full bootstrap (three compiles) you can
either pass:

    ./configure --enable-full-bootstrap

or if you're using config.toml:

    [build]
    full-bootstrap = true

Overall this will hopefully be an easy 33% win in build times of the
compiler. If we do 33% less work we should be 33% faster! This in turn
should affect cycle times and such on Travis and AppVeyor positively as
well as making it easier to work on the compiler itself.

7 years agoUse "an" before "i32"
Adam Langley [Wed, 28 Dec 2016 20:57:50 +0000 (12:57 -0800)]
Use "an" before "i32"

(Minor typo fix.)

Since the word `i32` starts with a vowel, the indefinite article should use "an", not "a" \[[1](http://www.dictionary.com/browse/an)\]. (Previously there was one instance of "an i32" and two instances of "a i32", so at least something is wrong!) Since I believe that "an" is the correct form, I aligned everything with that.

7 years agoAuto merge of #38449 - eddyb:lazy-10, r=nikomatsakis
bors [Wed, 28 Dec 2016 20:19:39 +0000 (20:19 +0000)]
Auto merge of #38449 - eddyb:lazy-10, r=nikomatsakis

[10/n] Split constants and functions' arguments into disjoint bodies.

_This is part of a series ([prev](https://github.com/rust-lang/rust/pull/38053) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well.
If any motivation is unclear, please ask for additional PR description clarifications or code comments._

<hr>

Finishes the signature-body split started in #37918, namely:
* `trait` items are separated just like `impl` items were, for uniformity, closing #37712
* `static`s, `const`s (including associated ones), `enum` discriminants and array lengths get bodies
  * even the count in "repeat expressions", i.e. `n` in `[x; n]`, which fixes #24414
* arguments' patterns are moved to the bodies, with the types staying in `FnDecl`
  * `&self` now desugars to `self: &Self` instead of `self: &_` (similarly for other `self` forms)
  * `astconv`'s and metadata's (for rustdoc) informative uses are explicitly ignored for the purposes of the dep graph. this could be fixed in the future by hashing the exact information being extracted about the arguments as opposed to generating a dependency on *the whole body*

7 years agoFix default terminfo code for reset (sg0 -> sgr0)
Martijn Vermaat [Wed, 28 Dec 2016 19:40:00 +0000 (14:40 -0500)]
Fix default terminfo code for reset (sg0 -> sgr0)

Resetting the terminal should first try `sgr0` (as per the comment), not
`sg0` which I believe to be a typo.

This will at least fix rustc output in Emacs terminals (e.g., ansi-term)
with `TERM=eterm-color` which does not provide the next fallback `sgr`. In
such a terminal, the final fallback `op` (`\e[39;49`) is used  which
resets only colors, not all attributes. This causes all text to be
printed in bold from the first string printed in bold by rustc onwards,
including the terminal prompt and the output from all following commands.

The typo seems to have been introduced by #29999

7 years agoAdd missing apostrophe.
Adam Langley [Wed, 28 Dec 2016 19:11:17 +0000 (11:11 -0800)]
Add missing apostrophe.

(Minor typo fix.)

The "support" in this case is possessed by the "programmer", and that ownership should be indicated by an apostrophe.

7 years agorustbuild: allow overriding list of LLVM targets to build
Wang Xuerui [Wed, 28 Dec 2016 18:23:38 +0000 (02:23 +0800)]
rustbuild: allow overriding list of LLVM targets to build

A new option is introduced under the `[llvm]` section of `config.toml`,
`targets`, for overriding the list of LLVM targets to build support for.
The option is passed through to LLVM configure script. Also notes are
added about the implications of (ab)using the option; since the default
is not changed, and users of the option are expected to know what
they're doing anyway (as every porter should), the impact should be
minimal.

Fixes #38200.

7 years agotravis: Use `&&` intead of `;`
Alex Crichton [Wed, 28 Dec 2016 17:29:14 +0000 (09:29 -0800)]
travis: Use `&&` intead of `;`

Show errors sooner and try not to hide them behind lots of other walls of text.

7 years agoAuto merge of #38639 - xen0n:nightly-dist-hotfix, r=brson
bors [Wed, 28 Dec 2016 17:27:13 +0000 (17:27 +0000)]
Auto merge of #38639 - xen0n:nightly-dist-hotfix, r=brson

rustbuild: Hotfix to unbreak nightly

Fixes an oversight unnoticed in #38468 that eventually broke nightly packaging. I didn't realize this until some moments ago, when I finally found out the failure is actually deterministic. Many apologies for eating 3 nightlies during the holidays.

r? @alexcrichton

7 years agoAuto merge of #38626 - redox-os:args_fix, r=alexcrichton
bors [Wed, 28 Dec 2016 14:33:48 +0000 (14:33 +0000)]
Auto merge of #38626 - redox-os:args_fix, r=alexcrichton

Fix argument handling on Redox

After switching the start code to be handled in libc, we are no longer passing in slices as arguments into the libstd main function. This means that handling had to be rewritten to match the unix way of doing things.

Additional commits on this branch are going to be merged in this PR: https://github.com/rust-lang/rust/pull/38577#issuecomment-269138394

7 years agoAdd missing urls for AtomicPtr
Guillaume Gomez [Tue, 27 Dec 2016 12:52:30 +0000 (13:52 +0100)]
Add missing urls for AtomicPtr

7 years agoAdd missing urls for atomic_int macros types
Guillaume Gomez [Wed, 28 Dec 2016 10:00:53 +0000 (11:00 +0100)]
Add missing urls for atomic_int macros types

7 years agoAuto merge of #38616 - pnkfelix:refactor-mir-dataflow-remove-ctxt, r=arielb1
bors [Wed, 28 Dec 2016 09:42:46 +0000 (09:42 +0000)]
Auto merge of #38616 - pnkfelix:refactor-mir-dataflow-remove-ctxt, r=arielb1

Refactor mir::dataflow: remove Ctxt associated type from BitDenotation trait

Refactor mir::dataflow: remove Ctxt associated type from BitDenotation trait

I no longer remember why I needed this (or thought I did). The way
that the `BitDenotation` is passed around in all existing use cases
(and planned future ones), the thing that were in the `Ctxt` can just
be part of `Self` instead.

(I think ariel had been pushing me to do this back when I first put in
this infrastructure; it took me a while to see how much of pain the
`Ctxt` was causing.)

7 years agorustdoc: pretty-print nested bodies in inlined constants.
Eduard-Mihai Burtescu [Tue, 27 Dec 2016 09:15:26 +0000 (11:15 +0200)]
rustdoc: pretty-print nested bodies in inlined constants.

7 years agorustc: always print nested nodes where a HIR map is available.
Eduard-Mihai Burtescu [Tue, 27 Dec 2016 08:00:18 +0000 (10:00 +0200)]
rustc: always print nested nodes where a HIR map is available.

7 years agorustc: simplify constant cross-crate loading and rustc_passes::consts.
Eduard-Mihai Burtescu [Tue, 20 Dec 2016 21:05:21 +0000 (23:05 +0200)]
rustc: simplify constant cross-crate loading and rustc_passes::consts.

7 years agorustc: move function arguments into hir::Body.
Eduard-Mihai Burtescu [Tue, 20 Dec 2016 20:46:11 +0000 (22:46 +0200)]
rustc: move function arguments into hir::Body.

7 years agorustc: separate bodies for static/(associated)const and embedded constants.
Eduard-Mihai Burtescu [Wed, 21 Dec 2016 10:32:59 +0000 (12:32 +0200)]
rustc: separate bodies for static/(associated)const and embedded constants.

7 years agorustc: separate TraitItem from their parent Item, just like ImplItem.
Eduard-Mihai Burtescu [Sun, 4 Dec 2016 02:21:06 +0000 (04:21 +0200)]
rustc: separate TraitItem from their parent Item, just like ImplItem.

7 years agohir: lower `ImplicitSelf` to resolved `Self` TyQPath's.
Eduard-Mihai Burtescu [Sun, 4 Dec 2016 01:18:11 +0000 (03:18 +0200)]
hir: lower `ImplicitSelf` to resolved `Self` TyQPath's.

7 years agocompiletest: Don't limit all suites on Android
Alex Crichton [Wed, 28 Dec 2016 07:26:50 +0000 (23:26 -0800)]
compiletest: Don't limit all suites on Android

On Android we only have one test thread for supposed problems with concurrency
and the remote debugger. Not all of our suites require one concurrency, however,
and suites like compile-fail or pretty can be much faster if they're
parallelized on Travis.

This commit only sets the test threads to one on Android for suites which
actually run code, and other suites aren't tampered with.

7 years agoAuto merge of #38589 - aidanhs:aphs-stage0-rustdoc-test, r=alexcrichton
bors [Wed, 28 Dec 2016 07:05:07 +0000 (07:05 +0000)]
Auto merge of #38589 - aidanhs:aphs-stage0-rustdoc-test, r=alexcrichton

Teach `rustdoc --test` about `--sysroot`, pass it when testing rust

This permits rustdoc tests to work in stage0.

Logical continuation of #36586.

Snippet from https://github.com/rust-lang/rust/issues/38575#issuecomment-269090724:

> it should actually be possible to run all the libstd tests immediately after creating std of stage0-out - there's no reason to build librustc at all if you've just made a change to (for example) libcollections, `./x.py test src/libcollections --stage 0 -v --incremental` should just work

This PR makes it so (or appears to in my testing).

r? @alexcrichton

7 years agoAuto merge of #38579 - whitequark:min_atomic_width, r=alexcrichton
bors [Wed, 28 Dec 2016 04:12:11 +0000 (04:12 +0000)]
Auto merge of #38579 - whitequark:min_atomic_width, r=alexcrichton

Add a min_atomic_width target option, like max_atomic_width

Rationale: some ISAs, e.g. OR1K, do not have atomic instructions
for byte and halfword access, and at the same time do not have
a fixed endianness, which makes it unreasonable to implement these
through word-sized atomic accesses.

7 years agorustbuild: fix host-only rules ignoring targets in dist steps
Wang Xuerui [Tue, 27 Dec 2016 17:49:25 +0000 (01:49 +0800)]
rustbuild: fix host-only rules ignoring targets in dist steps

`arr` is the actual list of targets participating in steps construction,
but due to #38468 the hosts array now consists of only the build triple
for the `dist` steps, hence all non-build-triple targets are lost for
the host-only rules.

Fix this by using the original non-shadowed hosts array in `arr`
calculation. This should unbreak the nightly packaging process.

Fixes #38637.

7 years agopropagate TIME_DEPTH to the helper threads for -Z time-passes
Niko Matsakis [Wed, 28 Dec 2016 02:35:34 +0000 (21:35 -0500)]
propagate TIME_DEPTH to the helper threads for -Z time-passes

7 years agoAuto merge of #38479 - michaelwoerister:extern_mod_ich, r=nikomatsakis
bors [Wed, 28 Dec 2016 01:30:31 +0000 (01:30 +0000)]
Auto merge of #38479 - michaelwoerister:extern_mod_ich, r=nikomatsakis

ICH: Fix and test foreign mod hashing.

r? @nikomatsakis

7 years agoAuto merge of #38329 - ollie27:rustdoc_stab_em_div, r=steveklabnik
bors [Tue, 27 Dec 2016 21:10:31 +0000 (21:10 +0000)]
Auto merge of #38329 - ollie27:rustdoc_stab_em_div, r=steveklabnik

rustdoc: Fix invalid HTML in stability notices

`em` tags cannot contain `p` tags so use `div`s instead of `em`s as the Markdown will create `p` tags.

7 years agorustbuild: clarify comment on target array calculation
Wang Xuerui [Tue, 27 Dec 2016 17:54:09 +0000 (01:54 +0800)]
rustbuild: clarify comment on target array calculation

The comment touched, as originally written, only concerned itself with
the `test` steps. However, since #38468 the `arr` variable actually has
gained an indirect relationship with the `dist` steps too. The comment
failed to convey the extra meaning, contributing to the misunderstanding
which eventually lead to #38637. Fix that by moving the comment into the
right place near the relevant condition, and properly documenting
`arr`'s purpose.

7 years agorustbuild: get an empty slice the straight-forward way
Wang Xuerui [Tue, 27 Dec 2016 19:39:35 +0000 (03:39 +0800)]
rustbuild: get an empty slice the straight-forward way

7 years agoAuto merge of #38600 - arielb1:dead-drop, r=eddyb
bors [Tue, 27 Dec 2016 18:25:22 +0000 (18:25 +0000)]
Auto merge of #38600 - arielb1:dead-drop, r=eddyb

clear discriminant drop flag at the bottom of a drop ladder

Fixes #38437.

Beta-nominating because serious I-wrong.

r? @eddyb

7 years agoFix arguments on Redox
Jeremy Soller [Tue, 27 Dec 2016 00:08:27 +0000 (17:08 -0700)]
Fix arguments on Redox