]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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 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 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

5 years agoRollup merge of #55598 - nrc:tool-bot, r=kennytm
Guillaume Gomez [Sat, 3 Nov 2018 12:40:39 +0000 (13:40 +0100)]
Rollup merge of #55598 - nrc:tool-bot, r=kennytm

publish-toolstate: ping maintainers when a tool builds again

And add @Xanewok as an RLS maintainer

r? @kennytm

Motivation is that I see when the RLS gets broken, but have to poll the website to see when it is fixed, I'd prefer to get pinged.

5 years agoRollup merge of #55568 - durka:rustdoc-big-enum, r=nikomatsakis
Guillaume Gomez [Sat, 3 Nov 2018 12:40:37 +0000 (13:40 +0100)]
Rollup merge of #55568 - durka:rustdoc-big-enum, r=nikomatsakis

test that rustdoc doesn't overflow on a big enum

Adds a test to close #25295. The test case depended on `enum_primitive` so I just basically pulled its source into an auxiliary file, is that the right way to do it?

5 years agoRollup merge of #55567 - durka:derive-debug-uninhabited, r=nikomatsakis
Guillaume Gomez [Sat, 3 Nov 2018 12:40:35 +0000 (13:40 +0100)]
Rollup merge of #55567 - durka:derive-debug-uninhabited, r=nikomatsakis

add test for deriving Debug on uninhabited enum

Adds a test to close #38885.

5 years agoRollup merge of #55555 - aidanhs:aphs-better-z-ls, r=alexcrichton
Guillaume Gomez [Sat, 3 Nov 2018 12:40:34 +0000 (13:40 +0100)]
Rollup merge of #55555 - aidanhs:aphs-better-z-ls, r=alexcrichton

Make `-Z ls` list the actual filename of external dependencies

The hash is pointless for external consumers - extra_filename is the thing that actually gets used, per https://github.com/rust-lang/rust/blob/ca2639e/src/librustc_metadata/locator.rs#L312-L313

5 years agoRollup merge of #54162 - GuillaumeGomez:hide-default-impls-items, r=QuietMisdreavus
Guillaume Gomez [Sat, 3 Nov 2018 12:40:32 +0000 (13:40 +0100)]
Rollup merge of #54162 - GuillaumeGomez:hide-default-impls-items, r=QuietMisdreavus

Hide default impls items

Follow up of #51885.
Fixes #54025.

cc @Mark-Simulacrum

r? @QuietMisdreavus

And screenshots of course:

<img width="1440" alt="screen shot 2018-09-12 at 23 30 35" src="https://user-images.githubusercontent.com/3050060/45454424-1ff8d500-b6e4-11e8-9257-030322495d58.png">

<img width="1440" alt="screen shot 2018-09-12 at 23 30 42" src="https://user-images.githubusercontent.com/3050060/45454431-2424f280-b6e4-11e8-8d65-db0d85ac18f0.png">

5 years agoMove cg_llvm::back::linker to cg_utils
bjorn3 [Sat, 20 Oct 2018 12:45:08 +0000 (14:45 +0200)]
Move cg_llvm::back::linker to cg_utils

5 years agoAuto merge of #55330 - scalexm:bound-ty, r=nikomatsakis
bors [Sat, 3 Nov 2018 12:11:23 +0000 (12:11 +0000)]
Auto merge of #55330 - scalexm:bound-ty, r=nikomatsakis

Add support for bound types

This PR may have some slight performance impacts, I don't know how hot is the code I touched.

Also, this breaks clippy and miri.

r? @nikomatsakis

5 years agoSubstitute binders directly
scalexm [Thu, 25 Oct 2018 14:01:10 +0000 (16:01 +0200)]
Substitute binders directly

5 years agoRename `as_bound_var` to `assert_bound_var`
scalexm [Thu, 25 Oct 2018 13:40:06 +0000 (15:40 +0200)]
Rename `as_bound_var` to `assert_bound_var`

5 years agoFix doc comment
scalexm [Thu, 25 Oct 2018 12:13:24 +0000 (14:13 +0200)]
Fix doc comment

5 years agoExtend `ty::fold::RegionReplacer` to `ty::fold::BoundVarReplacer`
scalexm [Wed, 24 Oct 2018 21:41:40 +0000 (23:41 +0200)]
Extend `ty::fold::RegionReplacer` to `ty::fold::BoundVarReplacer`
Use the new `BoundVarReplacer` to perform canonical substitutions.

5 years agoRename `Binder::no_late_bound_regions` to `Binder::no_bound_vars`
scalexm [Wed, 24 Oct 2018 20:30:34 +0000 (22:30 +0200)]
Rename `Binder::no_late_bound_regions` to `Binder::no_bound_vars`

5 years agoRemove `ReCanonical` in favor of `ReLateBound`
scalexm [Wed, 24 Oct 2018 08:29:42 +0000 (10:29 +0200)]
Remove `ReCanonical` in favor of `ReLateBound`

5 years agoAdjust bound tys indices in canonicalization
scalexm [Tue, 23 Oct 2018 17:47:53 +0000 (19:47 +0200)]
Adjust bound tys indices in canonicalization

5 years agoRename `BoundTy` field `level` -> `index`
scalexm [Tue, 23 Oct 2018 14:28:53 +0000 (16:28 +0200)]
Rename `BoundTy` field `level` -> `index`

5 years agoRename `BoundTyIndex` to `BoundVar`
scalexm [Tue, 23 Oct 2018 11:42:23 +0000 (13:42 +0200)]
Rename `BoundTyIndex` to `BoundVar`

5 years agoShift both late bound regions and bound types
scalexm [Mon, 22 Oct 2018 20:38:51 +0000 (22:38 +0200)]
Shift both late bound regions and bound types

5 years agoci: Add Dockerfile for dist-powerpcspe-linux
John Paul Adrian Glaubitz [Sat, 3 Nov 2018 10:41:35 +0000 (11:41 +0100)]
ci: Add Dockerfile for dist-powerpcspe-linux

5 years agoMove `BoundTy` to `ty::TyKind`
scalexm [Mon, 22 Oct 2018 18:37:56 +0000 (20:37 +0200)]
Move `BoundTy` to `ty::TyKind`

5 years agoAuto merge of #55238 - alexcrichton:rm-jemalloc, r=estebank
bors [Sat, 3 Nov 2018 09:33:10 +0000 (09:33 +0000)]
Auto merge of #55238 - alexcrichton:rm-jemalloc, r=estebank

Remove the `alloc_jemalloc` crate

This commit removes the `alloc_jemalloc` crate from the standard library and all related configuration. We will no longer be shipping this unstable crate. Rationale for this is provided on https://github.com/rust-lang/rust/issues/36963 and the many linked issues, but I can inline rationale here if desired!

We currently rely on jemalloc for increased perf in the Rust compiler, however. [This perf run shows](https://perf.rust-lang.org/compare.html?start=74ff7dcb1388e60a613cd6050bcd372a3cc4998b&end=7e7928dc0340d79b404e93f0c79eb4b946c1d669&stat=wall-time) that if we switch to glibc 2.23's allocator that it's slower than jemalloc across many benchmarks. [This perf run, however](https://perf.rust-lang.org/compare.html?start=22cc2ae8057d14e980b7c784e1eb2eee26b59e7d&end=10c95ccfa7a7adc12f4e608621ca29f9b98eed29), shows that if we use `jemalloc-sys` from crates.io then rustc actually gets faster across all benchmarks! (presumably because it has a more recent version of jemalloc than our submodule).

As a result, it's expected that this doesn't regress any code (as it's just removing an unstable crate) and it should actually improve rustc performance because it updates jemalloc.

Closes #36963

5 years agoAuto merge of #55363 - pietroalbini:update-cargo-vendor, r=Mark-Simulacrum
bors [Sat, 3 Nov 2018 06:50:19 +0000 (06:50 +0000)]
Auto merge of #55363 - pietroalbini:update-cargo-vendor, r=Mark-Simulacrum

Bump cargo-vendor version

Currently we pin `cargo-vendor` to 0.1.4, which doesn't set the `User-Agent` HTTP header. crates.io is going to require that header in the near future, so this PR bumps the pinned version of the crate to the latest one (which correctly sets the header).

r? @Mark-Simulacrum
cc @sgrif

5 years agofix test fallout
Alex Burka [Sat, 3 Nov 2018 05:03:30 +0000 (05:03 +0000)]
fix test fallout

5 years agoFixed bug with Self type param coming before lifetimes.
Alexander Regueiro [Thu, 1 Nov 2018 21:52:56 +0000 (21:52 +0000)]
Fixed bug with Self type param coming before lifetimes.

5 years agoAdded WF checking for trait alias definitions.
Alexander Regueiro [Thu, 1 Nov 2018 18:17:58 +0000 (18:17 +0000)]
Added WF checking for trait alias definitions.

5 years agoFixed unsoundness hole.
Alexander Regueiro [Thu, 1 Nov 2018 03:08:04 +0000 (03:08 +0000)]
Fixed unsoundness hole.

5 years agoResolve nits brought up in review.
Alexander Regueiro [Thu, 1 Nov 2018 02:00:32 +0000 (02:00 +0000)]
Resolve nits brought up in review.

5 years agoExtended elaboration for trait aliases to include arbitrary bounds.
Alexander Regueiro [Fri, 26 Oct 2018 22:13:12 +0000 (23:13 +0100)]
Extended elaboration for trait aliases to include arbitrary bounds.

5 years agoAdd more tests.
Alexander Regueiro [Thu, 25 Oct 2018 00:03:25 +0000 (01:03 +0100)]
Add more tests.

5 years agoAdded section to Unstable Book.
Alexander Regueiro [Mon, 22 Oct 2018 01:55:01 +0000 (02:55 +0100)]
Added section to Unstable Book.

5 years agoAdded tests.
Alexander Regueiro [Mon, 22 Oct 2018 00:58:34 +0000 (01:58 +0100)]
Added tests.

5 years agoAdded support for trait aliases as object types.
Alexander Regueiro [Sun, 21 Oct 2018 23:45:24 +0000 (00:45 +0100)]
Added support for trait aliases as object types.