]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoUpdate output of `lint-type-overflow2.stderr` to reflect its output from `rustc -O`.
Felix S. Klock II [Wed, 7 Nov 2018 14:47:49 +0000 (15:47 +0100)]
Update output of `lint-type-overflow2.stderr` to reflect its output from `rustc -O`.

(The fact that output differs under `opt-level=0` is an instance of #55757.)

5 years agoRemoved `#[rustc_error]` from tests that are all `// compile-pass`.
Felix S. Klock II [Wed, 31 Oct 2018 12:08:01 +0000 (13:08 +0100)]
Removed `#[rustc_error]` from tests that are all `// compile-pass`.

I also added `// skip-codegen` to each one, to address potential concerns
that this change would otherwise slow down our test suite spending time
generating code for files that are really just meant to be checks of
compiler diagnostics.

(However, I will say: My preference is to not use `// skip-codegen` if
one can avoid it. We can use all the testing of how we drive LLVM that
we can get...)

(Updated post rebase.)

5 years agoReplaced use of `#[rustc_error]` with `// skip-codegen`.
Felix S. Klock II [Wed, 31 Oct 2018 11:24:01 +0000 (12:24 +0100)]
Replaced use of `#[rustc_error]` with `// skip-codegen`.

This test specifically notes that it does not want to invoke the
linker, due to the way it (IMO weakly) exercises the `#[link=...]`
attribute.

In any case, removing the the `#[rustc_error]` here uncovered an
"invalid windows subsystem" error that was previously not included in
the transcript of diagnostic output. So that's a step forward, (right?).

5 years agoremove `#[rustc_error]` from ui/ tests that remain compile-fail tests.
Felix S. Klock II [Tue, 30 Oct 2018 23:18:11 +0000 (00:18 +0100)]
remove `#[rustc_error]` from ui/ tests that remain compile-fail tests.

5 years agoAuto merge of #55549 - RalfJung:miri-visitor, r=oli-obk
bors [Wed, 7 Nov 2018 09:14:12 +0000 (09:14 +0000)]
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.~~

5 years agoAuto merge of #55262 - oli-obk:dangling_alloc_id_ice, r=RalfJung
bors [Tue, 6 Nov 2018 23:36:13 +0000 (23:36 +0000)]
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

5 years agoAuto merge of #53996 - sekineh:thumb-run, r=japaric
bors [Tue, 6 Nov 2018 18:58:31 +0000 (18:58 +0000)]
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

5 years agoAuto merge of #55610 - gnzlbg:update_stdsimd, r=alexcrichton
bors [Tue, 6 Nov 2018 13:08:17 +0000 (13:08 +0000)]
Auto merge of #55610 - gnzlbg:update_stdsimd, r=alexcrichton

[breaking change] update stdsimd

r? @alexcrichton

5 years agoAuto merge of #55710 - kennytm:rollup, r=kennytm
bors [Tue, 6 Nov 2018 09:20:31 +0000 (09:20 +0000)]
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)

5 years agoRollup merge of #55703 - pnkfelix:update-configure-help-to-reflect-pr-54811, r=Mark...
kennytm [Tue, 6 Nov 2018 07:21:12 +0000 (15:21 +0800)]
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).

5 years agoRollup merge of #55700 - pnkfelix:issue-55533-update-ui-tests-wrt-nll, r=davidtwco
kennytm [Tue, 6 Nov 2018 07:21:11 +0000 (15:21 +0800)]
Rollup merge of #55700 - pnkfelix:issue-55533-update-ui-tests-wrt-nll, r=davidtwco

Update ui tests with respect to NLL

Fix #55533

5 years agoRollup merge of #55696 - davidtwco:issue-55675, r=pnkfelix
kennytm [Tue, 6 Nov 2018 07:21:10 +0000 (15:21 +0800)]
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

5 years agoRollup merge of #55694 - jsirs:issue-31076, r=oli-obk
kennytm [Tue, 6 Nov 2018 07:21:09 +0000 (15:21 +0800)]
Rollup merge of #55694 - jsirs:issue-31076, r=oli-obk

Fixes #31076

5 years agoRollup merge of #55689 - RalfJung:miri-immediate, r=oli-obk
kennytm [Tue, 6 Nov 2018 07:21:07 +0000 (15:21 +0800)]
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

5 years agoRollup merge of #55664 - varkor:all-possible-cases-message, r=zackmdavis
kennytm [Tue, 6 Nov 2018 07:21:06 +0000 (15:21 +0800)]
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.

5 years agoRollup merge of #55644 - glaubitz:powerpcspe-linux, r=alexcrichton
kennytm [Tue, 6 Nov 2018 07:21:05 +0000 (15:21 +0800)]
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.

5 years agoRollup merge of #55621 - GuillaumeGomez:create-dir, r=QuietMisdreavus
kennytm [Tue, 6 Nov 2018 07:21:02 +0000 (15:21 +0800)]
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

5 years agoRollup merge of #55601 - petrochenkov:featissue, r=pnkfelix
kennytm [Tue, 6 Nov 2018 07:21:01 +0000 (15:21 +0800)]
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.

5 years agoRollup merge of #55597 - alexcrichton:thread-local-inner, r=KodrAus
kennytm [Tue, 6 Nov 2018 07:20:59 +0000 (15:20 +0800)]
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.

5 years agoRollup merge of #55490 - petrochenkov:resolveice, r=eddyb
kennytm [Tue, 6 Nov 2018 07:20:57 +0000 (15:20 +0800)]
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

5 years agoAuto merge of #55518 - alexcrichton:smaller-wasm, r=sfackler
bors [Tue, 6 Nov 2018 04:04:33 +0000 (04:04 +0000)]
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.

5 years agoAuto merge of #55106 - petrhosek:fuchsia-lld, r=alexcrichton
bors [Tue, 6 Nov 2018 01:20:58 +0000 (01:20 +0000)]
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.

5 years agoUse lld directly for Fuchsia target
Petr Hosek [Tue, 16 Oct 2018 00:27:07 +0000 (17:27 -0700)]
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.

5 years agoAuto merge of #54922 - murarth:rc-ub-fix, r=alexcrichton
bors [Mon, 5 Nov 2018 22:20:25 +0000 (22:20 +0000)]
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

5 years agoAuto merge of #55410 - nagisa:atomic-align, r=pnkfelix
bors [Mon, 5 Nov 2018 19:29:57 +0000 (19:29 +0000)]
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

5 years agoFix undefined behavior in Rc/Arc allocation
Murarth [Mon, 8 Oct 2018 23:52:48 +0000 (16:52 -0700)]
Fix undefined behavior in Rc/Arc allocation

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

5 years agoThis should have been part of PR #54811 (my bad).
Felix S. Klock II [Mon, 5 Nov 2018 17:06:23 +0000 (18:06 +0100)]
This should have been part of PR #54811 (my bad).

5 years agoDo not Atomic{I,U}128 in stage0
Simonas Kazlauskas [Mon, 5 Nov 2018 13:46:13 +0000 (15:46 +0200)]
Do not Atomic{I,U}128 in stage0

5 years agoAuto merge of #55451 - estebank:arg-doc, r=pnkfelix
bors [Mon, 5 Nov 2018 16:36:18 +0000 (16:36 +0000)]
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.

5 years agoFor feature-gate-nll test, turn off testing modes that externally enable NLL.
Felix S. Klock II [Mon, 5 Nov 2018 15:37:18 +0000 (16:37 +0100)]
For feature-gate-nll test, turn off testing modes that externally enable NLL.

5 years agoadd call to tcx.sess.delay_span_bug
jsirs [Mon, 5 Nov 2018 15:30:01 +0000 (17:30 +0200)]
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

5 years agoMake `ui/borrowck/borrowck-overloaded-call.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 15:29:41 +0000 (16:29 +0100)]
Make `ui/borrowck/borrowck-overloaded-call.rs` robust w.r.t. NLL.

5 years agoUse `// revisions` in the dropck-eyepatch tests instead of relying on compare-mode...
Felix S. Klock II [Mon, 5 Nov 2018 15:19:51 +0000 (16:19 +0100)]
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.)

5 years agoUpdate `ui/borrowck/borrowck-closures-mut-of-imm.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 14:25:11 +0000 (15:25 +0100)]
Update `ui/borrowck/borrowck-closures-mut-of-imm.rs` robust w.r.t. NLL.

5 years agoAdd `ui/borrowck/borrowck-closures-mut-of-mut.rs`.
Felix S. Klock II [Mon, 5 Nov 2018 14:24:25 +0000 (15:24 +0100)]
Add `ui/borrowck/borrowck-closures-mut-of-mut.rs`.

This is a variant of `ui/borrowck/borrowck-closures-mut-of-imm.rs`
that I used to help identify what changes I needed to make to the
latter file in order to recover its instances of E0524 under NLL.

(Basically this test includes the changes you'd need to make to
`ui/borrowck/borrowck-closures-mut-of-imm.rs` in order to get rid of
occurrences of E0596. And then I realized that one needs to add
invocations of the closures in order to properly extend the mutable
reborrows in a manner such that NLL will roughly match AST-borrowck.)

5 years agoRemoved overlapping_spans.{rs,stderr,nll.stderr}.
Felix S. Klock II [Mon, 5 Nov 2018 13:55:30 +0000 (14:55 +0100)]
Removed overlapping_spans.{rs,stderr,nll.stderr}.

This is based on the feedback from estebank:

"""
I believe that test can be removed outright. It'd be impossible for a
new change to go through that breaks this kind of output without it
being picked up by multiple other `stderr` tests. This is an artifact
of the transition period to the "new" output style.
"""

see: https://github.com/rust-lang/rust/issues/52663#issuecomment-422155551

5 years agoMake `ui/binop-move-semantics.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 13:48:35 +0000 (14:48 +0100)]
Make `ui/binop-move-semantics.rs` robust w.r.t. NLL.

5 years agoRemove `println!`'s from `ui/issues/issue-52126-assign-op-invariance.rs`
Felix S. Klock II [Mon, 5 Nov 2018 13:44:14 +0000 (14:44 +0100)]
Remove `println!`'s from `ui/issues/issue-52126-assign-op-invariance.rs`

This is not strictly necessary to make this test "more robust with
respect to NLL"; its just an attempt to narrow the scope of the test
and focus on its core.

5 years agoMake `ui/unop-move-semantics.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 13:36:58 +0000 (14:36 +0100)]
Make `ui/unop-move-semantics.rs` robust w.r.t. NLL.

5 years agoMake `ui/borrowck/borrowck-unboxed-closures.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 13:32:00 +0000 (14:32 +0100)]
Make `ui/borrowck/borrowck-unboxed-closures.rs` robust w.r.t. NLL.

5 years agoMake `ui/borrowck/borrowck-reborrow-from-mut.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 13:05:23 +0000 (14:05 +0100)]
Make `ui/borrowck/borrowck-reborrow-from-mut.rs` robust w.r.t. NLL.

5 years agoMake `ui/borrowck/borrowck-overloaded-index-move-index.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 12:55:00 +0000 (13:55 +0100)]
Make `ui/borrowck/borrowck-overloaded-index-move-index.rs` robust w.r.t. NLL.

5 years agoMake `ui/issues/issue-17263.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 12:49:58 +0000 (13:49 +0100)]
Make `ui/issues/issue-17263.rs` robust w.r.t. NLL.

5 years agoMake `ui/span/borrowck-borrow-overloaded-auto-deref-mut.rs` robust w.r.t. NLL.
Felix S. Klock II [Mon, 5 Nov 2018 12:07:51 +0000 (13:07 +0100)]
Make `ui/span/borrowck-borrow-overloaded-auto-deref-mut.rs` robust w.r.t. NLL.

5 years agoSwitch to using revisions in borrowck-lend-flow-loop.rs
Felix S. Klock II [Mon, 5 Nov 2018 11:59:40 +0000 (12:59 +0100)]
Switch to using revisions in borrowck-lend-flow-loop.rs

Most of the time we want to robustify tests, but in this case this
test is deliberately encoding artifacts of AST-borrowck.  So instead
of adding artificial uses that would obscure the aspects of
AST-borrowck that are being tests, we instead use revisions and then
mark the cases that apply to NLL as well as AST-borrowck.

5 years agoadd method to obtain the ptr offset of a Scalar
Ralf Jung [Mon, 5 Nov 2018 14:11:28 +0000 (15:11 +0100)]
add method to obtain the ptr offset of a Scalar

5 years agoadd test for i32, fix incorrect location
jsirs [Mon, 5 Nov 2018 13:57:07 +0000 (15:57 +0200)]
add test for i32, fix incorrect location

5 years agoupdate test to include concrete type (i32)
jsirs [Mon, 5 Nov 2018 13:54:10 +0000 (15:54 +0200)]
update test to include concrete type (i32)

5 years agowalk_value: more tracing
Ralf Jung [Mon, 5 Nov 2018 13:34:43 +0000 (14:34 +0100)]
walk_value: more tracing

5 years agoself.associated_item can return none
jsirs [Mon, 5 Nov 2018 12:37:36 +0000 (14:37 +0200)]
self.associated_item can return none

self.associated_item can return none, replace unwrap with '?' and bubble up None value instead of panicking

5 years agoAdd test
jsirs [Mon, 5 Nov 2018 12:33:43 +0000 (14:33 +0200)]
Add test

Add test for incompleately implemented add trait, see issue #31076

5 years agoAuto merge of #55515 - QuietMisdreavus:rustdoc-config, r=GuillaumeGomez
bors [Mon, 5 Nov 2018 09:48:46 +0000 (09:48 +0000)]
Auto merge of #55515 - QuietMisdreavus:rustdoc-config, r=GuillaumeGomez

rustdoc: refactor: centralize all command-line argument parsing

This is something i've wanted to do for a while, since we keep having to add new arguments to places like `rust_input` or `core::run_core` whenever we add a new CLI flag or the like. Those functions have inflated up to 11-19, and in some cases hiding away the locations where some CLI flags were being parsed, obscuring their use. Now, we have a central place where all command-line configuration occurs, including argument validation.

One note about the design: i grouped together all the arguments that `html::render::run` needed, so that i could pass them on from compilation in one lump instead of trying to thread through individual items or clone the entire blob ahead of time.

One other thing this adds is that rustdoc also now recognizes all the `-Z` options that rustc does, since we were manually grabbing a few previously. Now we parse a full `DebuggingOptions` struct and hand it directly to rustc when scraping docs.

5 years agoproide ptr_wrapping_offset on Scalars
Ralf Jung [Sun, 4 Nov 2018 11:45:21 +0000 (12:45 +0100)]
proide ptr_wrapping_offset on Scalars

5 years agomake ValueVisitor mut-polymorphic
Ralf Jung [Fri, 2 Nov 2018 13:06:43 +0000 (14:06 +0100)]
make ValueVisitor mut-polymorphic

5 years agomachine hooks for ptr (de)ref also need layout, and then they do not need the size
Ralf Jung [Fri, 2 Nov 2018 12:17:06 +0000 (13:17 +0100)]
machine hooks for ptr (de)ref also need layout, and then they do not need the size

5 years agoFIXME
Ralf Jung [Fri, 2 Nov 2018 10:24:36 +0000 (11:24 +0100)]
FIXME

5 years agovisit_aggregate with an iterator; fix some comment typos
Ralf Jung [Fri, 2 Nov 2018 09:52:07 +0000 (10:52 +0100)]
visit_aggregate with an iterator; fix some comment typos

5 years agothe visitor can already load the value for visit_primitive
Ralf Jung [Fri, 2 Nov 2018 09:01:22 +0000 (10:01 +0100)]
the visitor can already load the value for visit_primitive

5 years agoall values can convert to operators
Ralf Jung [Fri, 2 Nov 2018 08:52:17 +0000 (09:52 +0100)]
all values can convert to operators

5 years agofinally this actually looks like a visitor
Ralf Jung [Fri, 2 Nov 2018 08:33:26 +0000 (09:33 +0100)]
finally this actually looks like a visitor

5 years agouse more traditional walk_array/visit_array instead of the handle_array hook
Ralf Jung [Fri, 2 Nov 2018 07:17:40 +0000 (08:17 +0100)]
use more traditional walk_array/visit_array instead of the handle_array hook

5 years agoconverting a VisitorValue to a MemPlace must not mutate anything
Ralf Jung [Thu, 1 Nov 2018 21:27:55 +0000 (22:27 +0100)]
converting a VisitorValue to a MemPlace must not mutate anything

5 years agoAlso test for undef in enum discriminant
Ralf Jung [Thu, 1 Nov 2018 13:41:36 +0000 (14:41 +0100)]
Also test for undef in enum discriminant

The error message is sub-par, but fixing that requries moving ScalarMaybeUndef
to librustc which would conflict badly with another PR that is in flight.

5 years agofix validation error on non-integer enum discriminants
Ralf Jung [Thu, 1 Nov 2018 13:14:51 +0000 (14:14 +0100)]
fix validation error on non-integer enum discriminants

5 years agolet the Value handle enum projections, so the visitor does not have to care
Ralf Jung [Thu, 1 Nov 2018 12:53:21 +0000 (13:53 +0100)]
let the Value handle enum projections, so the visitor does not have to care

5 years agoprovide some default implementations
Ralf Jung [Thu, 1 Nov 2018 12:23:25 +0000 (13:23 +0100)]
provide some default implementations

5 years agoadd visit() hook to the trait
Ralf Jung [Thu, 1 Nov 2018 12:11:23 +0000 (13:11 +0100)]
add visit() hook to the trait

5 years agofix for pre-NLL rustc
Ralf Jung [Wed, 31 Oct 2018 20:07:17 +0000 (21:07 +0100)]
fix for pre-NLL rustc

5 years agoalso allow visiting places and mplaces
Ralf Jung [Wed, 31 Oct 2018 18:52:10 +0000 (19:52 +0100)]
also allow visiting places and mplaces

5 years agoreduce the amount of traversal/projection code that the visitor has to implement...
Ralf Jung [Wed, 31 Oct 2018 17:44:00 +0000 (18:44 +0100)]
reduce the amount of traversal/projection code that the visitor has to implement itself

5 years agogeneralize the traversal part of validation to a ValueVisitor
Ralf Jung [Wed, 31 Oct 2018 15:46:33 +0000 (16:46 +0100)]
generalize the traversal part of validation to a ValueVisitor

5 years agomiri: binary_op_val -> binary_op_imm
Ralf Jung [Mon, 5 Nov 2018 08:10:48 +0000 (09:10 +0100)]
miri: binary_op_val -> binary_op_imm

5 years agoAuto merge of #55681 - matthiaskrgr:clippy, r=oli-obk
bors [Mon, 5 Nov 2018 06:58:10 +0000 (06:58 +0000)]
Auto merge of #55681 - matthiaskrgr:clippy, r=oli-obk

submodules: update clippy from 71ec4ff6 to d8b42690

Fixes clippy toolstate.

Changes:

````
rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)
Fix typo
Improve clippy_dev help text
RIIR update lints: Generate lint group registrations
Test clippy_dev on CI and fix test
RIIR update lints: Generate modules section
````

5 years agoAuto merge of #55593 - nikic:remove-llvm-4-checks, r=rkruppe
bors [Mon, 5 Nov 2018 01:41:55 +0000 (01:41 +0000)]
Auto merge of #55593 - nikic:remove-llvm-4-checks, r=rkruppe

Remove checks for LLVM < 4.0

While we still have to support LLVM 4.0 for Emscripten, we can drop checks for LLVM >= 4.0 and < 4.0.

5 years agoAuto merge of #55569 - durka:must-use-external-macro, r=alexcrichton
bors [Sun, 4 Nov 2018 22:56:23 +0000 (22:56 +0000)]
Auto merge of #55569 - durka:must-use-external-macro, r=alexcrichton

enforce unused-must-use lint in macros

Fixes #55516 by turning on the UNUSED_MUST_USE lint within macros.

5 years agosubmodules: update clippy from 71ec4ff6 to d8b42690
Matthias Krüger [Sun, 4 Nov 2018 22:49:42 +0000 (23:49 +0100)]
submodules: update clippy from 71ec4ff6 to d8b42690

Fixes clippy toolstate.

Changes:

````
rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)
Fix typo
Improve clippy_dev help text
RIIR update lints: Generate lint group registrations
Test clippy_dev on CI and fix test
RIIR update lints: Generate modules section
````

5 years agofix formatting
QuietMisdreavus [Sun, 4 Nov 2018 22:44:28 +0000 (16:44 -0600)]
fix formatting

5 years agoadd Debug impls for the Options structs
QuietMisdreavus [Sun, 4 Nov 2018 22:39:24 +0000 (16:39 -0600)]
add Debug impls for the Options structs

5 years agoAuto merge of #55665 - eddyb:by-ref-layout-of, r=oli-obk
bors [Sun, 4 Nov 2018 18:56:43 +0000 (18:56 +0000)]
Auto merge of #55665 - eddyb:by-ref-layout-of, r=oli-obk

rustc_target: pass contexts by reference, not value.

`LayoutOf` now takes `&self` instead of `self`, and so does every method generic over a context that implements `LayoutOf` and/or other traits, like `HasDataLayout`, `HasTyCtxt`, etc.

Originally using by-value `Copy` types was relevant because `TyCtxt` was one of those types, but now `TyCtxt::layout_of` is separate from `LayoutOf`, and `TyCtxt` is not an often used layout context.

Passing these context by reference is a lot nicer for miri, which has `self: &mut EvalContext`, and needed `f(&self)` (that is, creating `&&mut EvalContext` references) for layout purposes.
Now, the `&mut EvalContext` can be passed to a function expecting `&C`, directly.

This should help with #54012 / #55627 (to not need `where &'a T::Cx: LayoutOf` bounds).

r? @nikomatsakis or @oli-obk or @nagisa cc @sunfishcode

5 years agorustc_target: pass contexts by reference, not value.
Eduard-Mihai Burtescu [Sat, 3 Nov 2018 20:57:53 +0000 (22:57 +0200)]
rustc_target: pass contexts by reference, not value.

5 years agoUpdate test to force error under NLL.
David Wood [Sun, 4 Nov 2018 17:36:30 +0000 (18:36 +0100)]
Update test to force error under NLL.

In each of the three cases in this test, there is a mutable borrow
of some field of the union and then a shared borrow of some other field
immediately following.

Under NLL, the mutable borrow is killed straight away as it isn't
used later - therefore not causing a conflict with the shared borrow.
This commit adds a use of the first mutable borrow to force the intended
errors to appear under NLL.

5 years agoCorrect indentation on documentation comment.
David Wood [Sun, 4 Nov 2018 17:05:54 +0000 (18:05 +0100)]
Correct indentation on documentation comment.

This commit adjusts the indentation of code within a documentation
comment so that it is correctly highlighted as code by rustdoc.

5 years agoAuto merge of #55393 - oli-obk:immediate_immediately, r=RalfJung
bors [Sun, 4 Nov 2018 15:06:32 +0000 (15:06 +0000)]
Auto merge of #55393 - oli-obk:immediate_immediately, r=RalfJung

Rename `Value` to `Immediate` for miri

r? @RalfJung

5 years agoAuto merge of #55349 - bjorn3:rustc_mir_collect_and_partition_mono_items, r=oli-obk
bors [Sun, 4 Nov 2018 12:20:55 +0000 (12:20 +0000)]
Auto merge of #55349 - bjorn3:rustc_mir_collect_and_partition_mono_items, r=oli-obk

Move collect_and_partition_mono_items to rustc_mir

Most of the logic of it is inside rustc_mir anyway.

Also removes the single function crate rustc_metadata_utils. Based on #55225

5 years agoAdd precision for create_dir function
Guillaume Gomez [Fri, 2 Nov 2018 17:23:51 +0000 (18:23 +0100)]
Add precision for create_dir function

5 years agoAuto merge of #55432 - zackmdavis:single_life, r=nikomatsakis
bors [Sun, 4 Nov 2018 09:45:49 +0000 (09:45 +0000)]
Auto merge of #55432 - zackmdavis:single_life, r=nikomatsakis

single life

 * structured ~~autofixable~~ (well, pending #53934 and rust-lang-nursery/rustfix#141) suggestions for the single-use-lifetimes lint in the case of function and method reference args
 * don't consider the anonymous lifetime `'_` as "single-use" (it's intended for exactly this sort of thing)

![single_life](https://user-images.githubusercontent.com/1076988/47613227-3b2b6400-da48-11e8-8efd-cb975ddf537d.png)

r? @nikomatsakis

5 years agoAuto merge of #55455 - estebank:expected-descr, r=michaelwoerister
bors [Sun, 4 Nov 2018 06:56:11 +0000 (06:56 +0000)]
Auto merge of #55455 - estebank:expected-descr, r=michaelwoerister

Use token description in "expected/found" parse messages

Fix #54309.

5 years ago[ci] run-make/thumb-none-qemu: add .cargo/config
Hideki Sekine [Sun, 4 Nov 2018 03:32:25 +0000 (12:32 +0900)]
[ci] run-make/thumb-none-qemu: add .cargo/config

5 years agoAuto merge of #54861 - rep-nop:find_main_in_doctest, r=estebank
bors [Sun, 4 Nov 2018 01:43:40 +0000 (01:43 +0000)]
Auto merge of #54861 - rep-nop:find_main_in_doctest, r=estebank

rustdoc: Replaces fn main search and extern crate search with proper parsing during doctests.

Fixes #21299.
Fixes #33731.

Let me know if there's any additional changes you'd like made!

5 years agoMake "all possible cases" help message uniform with existing help messages
varkor [Sat, 3 Nov 2018 21:09:53 +0000 (21:09 +0000)]
Make "all possible cases" help message uniform with existing help messages

Specifically no capitalisation or trailing full stops.

5 years agoAuto merge of #55662 - matthiaskrgr:clippy_update, r=oli-obk
bors [Sat, 3 Nov 2018 23:02:04 +0000 (23:02 +0000)]
Auto merge of #55662 - matthiaskrgr:clippy_update, r=oli-obk

submodules: update clippy from a20599ab to 71ec4ff6

Should fix clippy toolstat.

Changes:

````
rustup https://github.com/rust-lang/rust/pull/55330/
Update stderr
Rename test files
Also lint cfg_attr(.., rustfmt::skip)
Add tests from rustfmt::skip test file
Run update_lints.py script
Add test for non-crate-level inner attributes
Differ between inner and outer attributes
Add tests
Add cfg_attr(rustfmt) lint
Addressed comments.
Fix dogfood error.
Added lints `into_iter_on_ref` and `into_iter_on_array`. Fix #1565.
Allow single_match_else
Update stderr
Add copyright statement©
Fix typos
Fix dogfood error
Fix typo and indentation
run update_lints script
Add tests for unknwon_clippy_lints lint
Add new lint: unknwon_clippy_lintsg
clippy: fix pedantic warnings and run clippy::pedantic lints on the codebase.
Fix a false-positive of needless_borrow
UI test cleanup: Extract match_overlapping_arm tests
UI test cleanup: Extract expect_fun_call tests
Add missing code of conduct file
Use slice patterns instead of padding
Fix dogfood and pedantic lints
ci: when installing rust-toolchain-installer-master, install it in debug mode to save some time in ci.
RIIR update lints: Generate deprecated lints
Replace big if/else expression with match
````

5 years agoAuto merge of #55661 - kennytm:fix-exclude, r=alexcrichton
bors [Sat, 3 Nov 2018 20:13:47 +0000 (20:13 +0000)]
Auto merge of #55661 - kennytm:fix-exclude, r=alexcrichton

Fixed the bug in bootstrap where --exclude was ignored for run-pass test

This should fix the 3 hour timeout on AppVeyor which happened a lot recently.

Additionally, further rebalanced the AppVeyor subsets by moving "ui" and "linkchecker" into Set 2.

5 years agosubmodules: update clippy from a20599ab to 71ec4ff6
Matthias Krüger [Sat, 3 Nov 2018 19:13:53 +0000 (20:13 +0100)]
submodules: update clippy from a20599ab to 71ec4ff6

Should fix clippy toolstat.

Changes:

````
rustup https://github.com/rust-lang/rust/pull/55330/
Update stderr
Rename test files
Also lint cfg_attr(.., rustfmt::skip)
Add tests from rustfmt::skip test file
Run update_lints.py script
Add test for non-crate-level inner attributes
Differ between inner and outer attributes
Add tests
Add cfg_attr(rustfmt) lint
Addressed comments.
Fix dogfood error.
Added lints `into_iter_on_ref` and `into_iter_on_array`. Fix #1565.
Allow single_match_else
Update stderr
Add copyright statement©
Fix typos
Fix dogfood error
Fix typo and indentation
run update_lints script
Add tests for unknwon_clippy_lints lint
Add new lint: unknwon_clippy_lintsg
clippy: fix pedantic warnings and run clippy::pedantic lints on the codebase.
Fix a false-positive of needless_borrow
UI test cleanup: Extract match_overlapping_arm tests
UI test cleanup: Extract expect_fun_call tests
Add missing code of conduct file
Use slice patterns instead of padding
Fix dogfood and pedantic lints
ci: when installing rust-toolchain-installer-master, install it in debug mode to save some time in ci.
RIIR update lints: Generate deprecated lints
Replace big if/else expression with match
````

5 years agoMove a few more tests into the appveyor-subset-2.
kennytm [Sat, 3 Nov 2018 18:33:38 +0000 (02:33 +0800)]
Move a few more tests into the appveyor-subset-2.

This should allow the timings be more balanced.

5 years agoEnsure --exclude is checked against PathSet::Suite
kennytm [Sat, 3 Nov 2018 18:32:53 +0000 (02:32 +0800)]
Ensure --exclude is checked against PathSet::Suite

Fix the recent spurious 3 hour timeouts.

5 years agoAuto merge of #55101 - alexreg:trait-aliases, r=nikomatsakis
bors [Sat, 3 Nov 2018 17:30:37 +0000 (17:30 +0000)]
Auto merge of #55101 - alexreg:trait-aliases, r=nikomatsakis

Implement trait aliases (RFC 1733)

Extends groundwork done in https://github.com/rust-lang/rust/pull/45047, and fully implements https://github.com/rust-lang/rfcs/pull/1733.

CC @durka @nikomatsakis

5 years agoAuto merge of #55646 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sat, 3 Nov 2018 14:51:05 +0000 (14:51 +0000)]
Auto merge of #55646 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 5 pull requests

Successful merges:

 - #54162 (Hide default impls items)
 - #55555 (Make `-Z ls` list the actual filename of external dependencies)
 - #55567 (add test for deriving Debug on uninhabited enum)
 - #55568 (test that rustdoc doesn't overflow on a big enum)
 - #55598 (publish-toolstate: ping maintainers when a tool builds again)

Failed merges:

r? @ghost

5 years agoUpdate src/librustc_mir/monomorphize/partitioning.rs
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Sat, 3 Nov 2018 13:45:50 +0000 (14:45 +0100)]
Update src/librustc_mir/monomorphize/partitioning.rs

Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
5 years agoRemove rustc_metadata_utils, which contains only one function
bjorn3 [Thu, 25 Oct 2018 13:11:59 +0000 (15:11 +0200)]
Remove rustc_metadata_utils, which contains only one function

5 years agoMove collect_and_partition_mono_items to rustc_mir
bjorn3 [Thu, 25 Oct 2018 12:49:51 +0000 (14:49 +0200)]
Move collect_and_partition_mono_items to rustc_mir