Commit Graph

85771 Commits

Author SHA1 Message Date
kennytm
3682d3140c
Rollup merge of #55692 - matthiaskrgr:remark_debuginfo_hint, r=michaelwoerister
-C remark: fix incorrect warning about requiring "--debuginfo" instead of "-C debuginfo=n"

Previously suggested "--debuginfo" does not actually work.
2018-11-07 18:01:57 +08:00
kennytm
8f93a3c05e
Rollup merge of #55688 - alexreg:move-issue-tests, r=estebank
Standardised names and location of ui issue tests

None
2018-11-07 18:01:56 +08:00
kennytm
dfa104ecf1
Rollup merge of #55609 - nikic:fix-51947, r=nagisa
Run name-anon-globals after LTO passes as well

If we're going to emit bitcode (through ThinLTOBuffer), then we need to ensure that anon globals are named. This was already done after optimization passes, but also has to happen after LTO passes, as we always emit the final result in a ThinLTO-compatible manner.

I added the test as `run-make`. The important bit is that we emit bitcode in some way (e.g. `--crate-type rlib` or `--emit=llvm-bc`). Please tell me if there is a better way to test for that.

Fixes #51947
2018-11-07 18:01:54 +08:00
kennytm
0708a6a717
Rollup merge of #55510 - bitshifter:repr-feature-gate-fix, r=petrochenkov
Fix feature gate only being checked on first repr attr.

Reported in https://github.com/rust-lang/rust/issues/33158#issuecomment-412185357.
2018-11-07 18:01:53 +08:00
kennytm
d64142bb2e
Rollup merge of #55501 - nnethercote:DoCompleted, r=pnkfelix
Make `process_obligations`' computation of `completed` optional.

It's only used in tests.

This reduces instruction counts on several benchmarks by 0.5--1%.
2018-11-07 18:01:51 +08:00
kennytm
099c587851
Rollup merge of #55495 - wesleywiser:opt_fuel_rustbuild, r=nikomatsakis
Don't print opt fuel messages to stdout because it breaks Rustbuild

Rustbuild passes `--message-format json` to the compiler invocations
which causes JSON to be emitted on stdout. Printing optimization fuel
messages to stdout breaks the json and causes Rustbuild to fail.

Work around this by emitting optimization fuel related messages on
stderr instead.
2018-11-07 18:01:50 +08:00
kennytm
88f214cfd5
Rollup merge of #55453 - Aaron1011:fix/rustdoc-lifetime, r=pnkfelix
Choose predicates without inference variables over those with them

Fixes #54705

When constructing synthetic auto trait impls, we may come across
multiple predicates involving the same type, trait, and substitutions.
Since we can only display one of these, we pick the one with the 'most
strict' lifetime paramters. This ensures that the impl we render the
user is actually valid (that is, a struct matching that impl will
actually implement the auto trait in question).

This commit exapnds the definition of 'more strict' to take into account
inference variables. We always choose a predicate without inference
variables over a predicate with inference variables.
2018-11-07 18:01:48 +08:00
kennytm
0156dd2589
Rollup merge of #55441 - xfix:patch-12, r=aturon
Remove unused re import in gdb_rust_pretty_printing
2018-11-07 18:01:47 +08:00
kennytm
ac9d5ec74e
Rollup merge of #55377 - goffrie:patch-2, r=joshtriplett
Slight copy-editing for `std::cell::Cell` docs

Hopefully this is a bit more precise and also more correct English.
2018-11-07 18:01:45 +08:00
bors
8315b11b63 Auto merge of #55549 - RalfJung:miri-visitor, r=oli-obk
Value visitors for miri

Generalize the traversal part of validation to a `ValueVisitor`.

~~This includes https://github.com/rust-lang/rust/pull/55316, [click here](https://github.com/RalfJung/rust/compare/retagging...RalfJung:miri-visitor) for just the new commits.~~
2018-11-07 09:14:12 +00:00
bors
ddd4b194a0 Auto merge of #55262 - oli-obk:dangling_alloc_id_ice, r=RalfJung
Change the ICE from #55223 to a hard error

cc @SimonSapin

r? @RalfJung

fixes https://github.com/rust-lang/rust/issues/55287
2018-11-06 23:36:13 +00:00
Esteban Küber
3ec837e763 Elide anon lifetimes in conflicting impl note 2018-11-06 14:49:09 -08:00
Amanieu d'Antras
02d50de63e Add a tracking issue for extra Layout methods 2018-11-06 20:36:43 +00:00
teresy
eca11b99a7 refactor: use shorthand fields 2018-11-06 15:05:44 -05:00
Esteban Küber
46fcf1c6ad Use trait impl method span when type param mismatch is due to impl Trait 2018-11-06 11:24:48 -08:00
bors
15d770400e Auto merge of #53996 - sekineh:thumb-run, r=japaric
[CI] Run a `thumbv7m-none-eabi` binary using `qemu-system-arm` [IRR-2018-embedded]

## What's included?

- Run a `thumbv7m-none-eabi` binary using `qemu-system-arm`
- We are using `cortex-m-rt = "=0.5.4"` which does not use `proc_macro`.
(reason: stage2 build of rustc does not work well with `proc_macro` in `run-make` phase.)
- We are using GNU LD for now.

## Blocker

All resolved.
- ~[Waiting] `#[panic_handler]` is not available in stable.~
  - [Merged] https://github.com/rust-lang/rust/pull/53619
- ~[Waiting] https://github.com/japaric/lm3s6965evb: does not compile on stable.~
  - [OK] dependent crate ~`panic-abort`~ `panic-halt`: already moved to use `#[panic_handler]`.

## Update

`#[panic_handler]` will be stabilized in Rust 1.30.

CC @kennytm @jamesmunns @nerdyvaishali
2018-11-06 18:58:31 +00:00
Tom Tromey
2869fda12c Update lldb
This updates lldb to pick up some bug fixes, and makes one minor test
suite fix to account for this.
2018-11-06 11:46:25 -07:00
Nikita Popov
66702fcd0a Run name-anon-globals after LTO passes as well
If we're going to emit bitcode (through ThinLTOBuffer), then we
need to ensure that anon globals are named. This was already done
after optimization passes, but also has to happen after LTO passes,
as we always emit the final result in a ThinLTO-compatible manner.

Fixes #51947.
2018-11-06 19:24:28 +01:00
Amanieu d'Antras
de027b64f1 API changes as discussed in the comments 2018-11-06 17:21:13 +00:00
Amanieu d'Antras
94f3ce9def Add a comment about how Layout::extend matches the C struct layout 2018-11-06 17:21:13 +00:00
Felix S. Klock II
22b571d62a Add explcit --error-format options to tests of print-fuel to sidestep compiletests presumption of JSON.
As a driveby, rename the stdout files to stderr, which should have been part of the earlier commit.
2018-11-06 17:07:27 +01:00
Felix S. Klock II
e7f8c0d105 Sidestep link error from rustfix'ed code by using a *defined* static.
As a drive-by, added `-g` to the compile-flags so that the test more
reliably fails to compile when the extern static in question is *not*
provided. (I.e. this is making the test more robust in the face of
potential future revisions.)

Fix #54388.
2018-11-06 14:21:52 +01:00
bors
bdfeace114 Auto merge of #55610 - gnzlbg:update_stdsimd, r=alexcrichton
[breaking change] update stdsimd

r? @alexcrichton
2018-11-06 13:08:17 +00:00
bors
f90aab7aa9 Auto merge of #55710 - kennytm:rollup, r=kennytm
Rollup of 11 pull requests

Successful merges:

 - #55490 (resolve: Fix ICE in macro import error recovery)
 - #55597 (std: Enable usage of `thread_local!` through imports)
 - #55601 (Fix tracking issue numbers for some unstable features)
 - #55621 (Add precision for create_dir function)
 - #55644 (ci: Add Dockerfile for dist-powerpcspe-linux)
 - #55664 (Make "all possible cases" help message uniform with existing help messages)
 - #55689 (miri: binary_op_val -> binary_op_imm)
 - #55694 (Fixes #31076)
 - #55696 (NLL Diagnostic Review 3: Missing errors for borrows of union fields)
 - #55700 (Update ui tests with respect to NLL)
 - #55703 (Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize)
2018-11-06 09:20:31 +00:00
kennytm
8589ca08b1
Rollup merge of #55703 - pnkfelix:update-configure-help-to-reflect-pr-54811, r=Mark-Simulacrum
Update `configure --help` (via configure.py) to reflect decoupling of debug+optimize

This should have been part of PR #54811 (my bad).
2018-11-06 17:08:33 +08:00
kennytm
6231720de0
Rollup merge of #55700 - pnkfelix:issue-55533-update-ui-tests-wrt-nll, r=davidtwco
Update ui tests with respect to NLL

Fix #55533
2018-11-06 17:08:31 +08:00
kennytm
1ea1a4277e
Rollup merge of #55696 - davidtwco:issue-55675, r=pnkfelix
NLL Diagnostic Review 3: Missing errors for borrows of union fields

Fixes #55675.

This PR modifies a test to make it more robust (it also fixes indentation on a doc comment, but that's not the point of the PR). See the linked issue for details.

r? @pnkfelix
2018-11-06 17:08:29 +08:00
kennytm
54bc9c27e4
Rollup merge of #55694 - jsirs:issue-31076, r=oli-obk
Fixes #31076
2018-11-06 17:08:27 +08:00
kennytm
8b3d9e5eff
Rollup merge of #55689 - RalfJung:miri-immediate, r=oli-obk
miri: binary_op_val -> binary_op_imm

Seems like this was overlooked during the value -> immediate rename.

r? @oli-obk
2018-11-06 17:08:25 +08:00
kennytm
435aca1c8f
Rollup merge of #55664 - varkor:all-possible-cases-message, r=zackmdavis
Make "all possible cases" help message uniform with existing help messages

Specifically no capitalisation or trailing full stops.
2018-11-06 17:08:21 +08:00
kennytm
225df14095
Rollup merge of #55644 - glaubitz:powerpcspe-linux, r=alexcrichton
ci: Add Dockerfile for dist-powerpcspe-linux

This adds the Dockerfile for cross-building Rust for the powerpcspe target. It's currently disabled.
2018-11-06 17:08:14 +08:00
kennytm
082156b2ac
Rollup merge of #55621 - GuillaumeGomez:create-dir, r=QuietMisdreavus
Add precision for create_dir function

Took me a while to find the other equivalent so it seems to be necessary.

r? @QuietMisdreavus
2018-11-06 17:08:10 +08:00
kennytm
6091696cfd
Rollup merge of #55601 - petrochenkov:featissue, r=pnkfelix
Fix tracking issue numbers for some unstable features

And also remove deprecated unstable `#[panic_implementation]` attribute that was superseded by stable `#[panic_handler]` and doesn't have an open tracking issue.
2018-11-06 17:08:08 +08:00
kennytm
462f63e1bb
Rollup merge of #55597 - alexcrichton:thread-local-inner, r=KodrAus
std: Enable usage of `thread_local!` through imports

The `thread_local!` macro delegated to an internal macro but it didn't
do so in a macros-and-the-module-system compatible fashion, meaning if a
`#![no_std]` crate imported `std` and tried to use `thread_local!` it
would fail due to missing a lookup of an internal macro.

This commit switches the macro to instead use `$crate` to invoke other
macros, ensuring that it'll work when `thread_local!` is imported alone.
2018-11-06 17:08:03 +08:00
kennytm
1525b0ee82
Rollup merge of #55490 - petrochenkov:resolveice, r=eddyb
resolve: Fix ICE in macro import error recovery

Fixes https://github.com/rust-lang/rust/issues/55457
2018-11-06 15:20:57 +08:00
bors
24e66c2898 Auto merge of #55518 - alexcrichton:smaller-wasm, r=sfackler
std: Improve codegen size of accessing TLS

Some code in the TLS implementation in libstd stores `Some(val)` into an
`&mut Option<T>` (effectively) and then pulls out `&T`, but it currently
uses `.unwrap()` which can codegen into a panic even though it can never
panic. With sufficient optimizations enabled (like LTO) the compiler can
see through this but this commit helps it along in normal mode
(`--release` with Cargo by default) to avoid codegen'ing the panic path.

This ends up improving the optimized codegen on wasm by ensuring that a
call to panic pulling in more file size doesn't stick around.
2018-11-06 04:04:33 +00:00
Alexander Regueiro
a1c4060c9d Moved and renamed ui issue tests. 2018-11-06 01:51:27 +00:00
bors
8aa926729e Auto merge of #55106 - petrhosek:fuchsia-lld, r=alexcrichton
Use lld directly for Fuchsia target

Fuchsia already uses lld as the default linker, so there's no reason
to always invoke it through Clang, instead we can simply invoke lld
directly and pass the set of flags that matches Clang.
2018-11-06 01:20:58 +00:00
Petr Hosek
3d27aca841 Use lld directly for Fuchsia target
Fuchsia already uses lld as the default linker, so there's no reason
to always invoke it through Clang, instead we can simply invoke lld
directly and pass the set of flags that matches Clang.
2018-11-05 15:46:00 -08:00
bors
65e485d8f1 Auto merge of #54922 - murarth:rc-ub-fix, r=alexcrichton
Fix undefined behavior in Rc/Arc allocation

Manually calculate allocation layout for `Rc`/`Arc` to avoid undefined behavior

Closes #54908
2018-11-05 22:20:25 +00:00
bors
13dab66a6f Auto merge of #55410 - nagisa:atomic-align, r=pnkfelix
Correct alignment of atomic types and (re)add Atomic{I,U}128

This is a updated https://github.com/rust-lang/rust/pull/53514 to also make atomic types `repr(C)` as per comment in https://github.com/rust-lang/rust/pull/53514#issuecomment-431042767.

Fixes #39590
Closes #53514

r? @pnkfelix
2018-11-05 19:29:57 +00:00
Murarth
d60290fc63 Fix undefined behavior in Rc/Arc allocation
Manually calculate allocation layout for `Rc`/`Arc` to avoid undefined behavior
2018-11-05 10:33:30 -07:00
Felix S. Klock II
034a0ebb6c This should have been part of PR #54811 (my bad). 2018-11-05 18:06:23 +01:00
Simonas Kazlauskas
99f7dc451f Do not Atomic{I,U}128 in stage0 2018-11-05 18:54:17 +02:00
bors
af791bb8f4 Auto merge of #55451 - estebank:arg-doc, r=pnkfelix
Custom diagnostic when trying to doc comment argument

When writing

```
pub fn f(
    /// Comment
    id: u8,
) {}
```

Produce a targeted diagnostic

```
error: documentation comments cannot be applied to method arguments
  --> $DIR/fn-arg-doc-comment.rs:2:5
   |
LL |     /// Comment
   |     ^^^^^^^^^^^ doc comments are not allowed here
```

Fix #54801.
2018-11-05 16:36:18 +00:00
Alex Crichton
842914e486 Add aarch64-pc-windows-msvc to deployed targets
Accidentally forgotten from #54718!
2018-11-05 07:54:38 -08:00
Felix S. Klock II
fff9ddedce For feature-gate-nll test, turn off testing modes that externally enable NLL. 2018-11-05 16:37:18 +01:00
jsirs
306397774d
add call to tcx.sess.delay_span_bug
add call to tcx.sess.delay_span_bug before returning none to make sure error is presented to user
2018-11-05 17:30:01 +02:00
Felix S. Klock II
b75fbbf540 Make ui/borrowck/borrowck-overloaded-call.rs robust w.r.t. NLL. 2018-11-05 16:29:41 +01:00
Felix S. Klock II
cf71582718 Use // revisions in the dropck-eyepatch tests instead of relying on compare-mode=nll.
NLL has increased precision in its analysis of drop order, and we want
the test annotations to deliberately reflect this by having fewer
ERROR annotations for NLL than for AST-borrowck. The best way to get
this effect is via `// revisions`.

As a drive-by, also added uses of all the borrows just to make it
clear that NLL isn't somehow sidestepping things by using shorter
borrows than you might have otherwise expected. (Of course, the added
uses do not make all that much difference since the relevant types all
declare `impl Drop` and thus those drops have implicit uses anyway.)
2018-11-05 16:19:51 +01:00