]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #63144 - matthiaskrgr:submodule_upd, r=Manishearth
bors [Wed, 31 Jul 2019 00:36:38 +0000 (00:36 +0000)]
Auto merge of #63144 - matthiaskrgr:submodule_upd, r=Manishearth

submodules: update clippy from dc69a5c0 to c3e91365

Changes:
````
Fix breakage due to rust-lang/rust#61856
Fix dogfood test
Hash discriminant of lifetime.name
Hash discriminant of Lifetime::Name
Updated tests.
Respond to review comments
Updated test stderr
Added doc comment fixed type printout
Respond to comments and improve printout
Responded to comments and fixed compile bug
Fixed more compile errors
Fix some of the compile errors
Changed Ty to ty, added lifetime 'tcx
Lint for type repetition in trait bounds.
````
r? @Manishearth

4 years agoAuto merge of #63148 - Centril:rollup-t813bxw, r=Centril
bors [Tue, 30 Jul 2019 20:48:49 +0000 (20:48 +0000)]
Auto merge of #63148 - Centril:rollup-t813bxw, r=Centril

Rollup of 7 pull requests

Successful merges:

 - #62293 (Unsupport the `await!(future)` macro)
 - #62469 (Add doc links to liballoc crate page)
 - #63095 (Turn `INCOMPLETE_FEATURES` into lint)
 - #63117 (Use global variable 'environ' to pass environments to rtpSpawn)
 - #63123 (`const fn`-ify `std::any::type_name` as laid out in #63084)
 - #63129 (Subslice patterns: Test passing static & dynamic semantics.)
 - #63147 (Updated RELEASES.md for 1.37.0)

Failed merges:

r? @ghost

4 years agoRollup merge of #63147 - Mark-Simulacrum:XAMPPRocky-master, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:40 +0000 (22:43 +0200)]
Rollup merge of #63147 - Mark-Simulacrum:XAMPPRocky-master, r=Mark-Simulacrum

Updated RELEASES.md for 1.37.0

Squashed https://github.com/rust-lang/rust/pull/62653.

4 years agoRollup merge of #63129 - Centril:subslice-pat-statdyn, r=oli-obk
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:39 +0000 (22:43 +0200)]
Rollup merge of #63129 - Centril:subslice-pat-statdyn, r=oli-obk

Subslice patterns: Test passing static & dynamic semantics.

Working towards testing coverage for https://github.com/rust-lang/rust/issues/62254.
See https://github.com/rust-lang/rfcs/blob/master/text/2359-subslice-pattern-syntax.md for the RFC.

r? @oli-obk cc @petrochenkov

4 years agoRollup merge of #63123 - TankhouseAle:const-fn-type-name-any, r=oli-obk
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:37 +0000 (22:43 +0200)]
Rollup merge of #63123 - TankhouseAle:const-fn-type-name-any, r=oli-obk

`const fn`-ify `std::any::type_name` as laid out in #63084

A test, based on the one I added when I implemented support for the underlying `core::intrinsics::type_name` being allowed in `const fn` contexts, is included.

4 years agoRollup merge of #63117 - BaoshanPang:bugfix, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:36 +0000 (22:43 +0200)]
Rollup merge of #63117 - BaoshanPang:bugfix, r=alexcrichton

Use global variable 'environ' to pass environments to rtpSpawn

r? @alexcrichton

4 years agoRollup merge of #63095 - Centril:incomplete-features-lint, r=varkor
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:34 +0000 (22:43 +0200)]
Rollup merge of #63095 - Centril:incomplete-features-lint, r=varkor

Turn `INCOMPLETE_FEATURES` into lint

We do this because it is annoying to see the warning when building rustc and because this is better from a "separation of concerns" POV.

The drawback to this change is that this will respect `--cap-lints`.
Also note that this is not a buffered lint so if there are fatal parser errors then the lint will not trigger.

r? @varkor

4 years agoRollup merge of #62469 - czipperz:liballoc-add-doc-links, r=GuillaumeGomez
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:33 +0000 (22:43 +0200)]
Rollup merge of #62469 - czipperz:liballoc-add-doc-links, r=GuillaumeGomez

Add doc links to liballoc crate page

4 years agoRollup merge of #62293 - Centril:remove-await-macro, r=cramertj
Mazdak Farrokhzad [Tue, 30 Jul 2019 20:43:31 +0000 (22:43 +0200)]
Rollup merge of #62293 - Centril:remove-await-macro, r=cramertj

Unsupport the `await!(future)` macro

Unsupport the `await!(future)` "macro" and recognize it in error recovery instead.

The `future.await` syntax has been on nightly since 2019-05-08.
This was 55 days ago which is 1.31 releases ago.

Closes https://github.com/rust-lang/rust/issues/60610.

r? @cramertj

4 years agoUpdated RELEASES.md for 1.37.0
Erin Power [Sat, 13 Jul 2019 12:15:01 +0000 (14:15 +0200)]
Updated RELEASES.md for 1.37.0

4 years agoAuto merge of #62805 - Xanewok:update-rls, r=Xanewok
bors [Tue, 30 Jul 2019 16:59:09 +0000 (16:59 +0000)]
Auto merge of #62805 - Xanewok:update-rls, r=Xanewok

Update RLS and Rustfmt

Supersedes https://github.com/rust-lang/rust/pull/62537.
Closes #62803.

Fixes fallout after https://github.com/rust-lang/rust/pull/62679.

r? @ghost

4 years agoEnable nightly feature for crossbeam-utils dep
Igor Matuszewski [Tue, 30 Jul 2019 16:10:52 +0000 (18:10 +0200)]
Enable nightly feature for crossbeam-utils dep

Last two commits bumped rustc-ap-* crates which also transitively
updated rustc_data_structures. That crate enables the "nightly"
whereas Cargo's dep does not hence why we need to unify the features
to deduplicate the artifacts.

4 years agosubmodules: update clippy from dc69a5c0 to c3e91365
Matthias Krüger [Tue, 30 Jul 2019 15:11:30 +0000 (17:11 +0200)]
submodules: update clippy from dc69a5c0 to c3e91365

Changes:
````
Fix breakage due to rust-lang/rust#61856
Fix dogfood test
Hash discriminant of lifetime.name
Hash discriminant of Lifetime::Name
Updated tests.
Respond to review comments
Updated test stderr
Added doc comment fixed type printout
Respond to comments and improve printout
Responded to comments and fixed compile bug
Fixed more compile errors
Fix some of the compile errors
Changed Ty to ty, added lifetime 'tcx
Lint for type repetition in trait bounds.
````

4 years agoUpdate Rustfmt
Igor Matuszewski [Tue, 30 Jul 2019 11:01:32 +0000 (13:01 +0200)]
Update Rustfmt

4 years agoUpdate RLS
Igor Matuszewski [Tue, 30 Jul 2019 11:00:27 +0000 (13:00 +0200)]
Update RLS

4 years agoPacify tidy, the merciless.
Mazdak Farrokhzad [Wed, 24 Jul 2019 02:05:20 +0000 (04:05 +0200)]
Pacify tidy, the merciless.

4 years agoUpdate error_codes re. await_macro removal.
Mazdak Farrokhzad [Sat, 6 Jul 2019 05:45:09 +0000 (07:45 +0200)]
Update error_codes re. await_macro removal.

4 years agoAdjust tests. wrt. await_macro being removed.
Mazdak Farrokhzad [Tue, 2 Jul 2019 04:46:35 +0000 (06:46 +0200)]
Adjust tests. wrt. await_macro being removed.

4 years agoUnsupport the await!(..) macro.
Mazdak Farrokhzad [Tue, 2 Jul 2019 04:30:21 +0000 (06:30 +0200)]
Unsupport the await!(..) macro.

4 years agoSubslice patterns: Test passing static & dynamic semantics.
Mazdak Farrokhzad [Tue, 30 Jul 2019 08:05:14 +0000 (10:05 +0200)]
Subslice patterns: Test passing static & dynamic semantics.

4 years ago--bless tests due to INCOMPLETE_FEATURES being a lint.
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:01:57 +0000 (02:01 +0200)]
--bless tests due to INCOMPLETE_FEATURES being a lint.

4 years agoAuto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, r=oli-obk
bors [Tue, 30 Jul 2019 08:39:29 +0000 (08:39 +0000)]
Auto merge of #62766 - alexcrichton:stabilize-pipelined-compilation, r=oli-obk

rustc: Stabilize options for pipelined compilation

This commit stabilizes options in the compiler necessary for Cargo to
enable "pipelined compilation" by default. The concept of pipelined
compilation, how it's implemented, and what it means for rustc are
documented in #60988. This PR is coupled with a PR against Cargo
(rust-lang/cargo#7143) which updates Cargo's support for pipelined
compliation to rustc, and also enables support by default in Cargo.
(note that the Cargo PR cannot land until this one against rustc lands).

The technical changes performed here were to stabilize the functionality
proposed in #60419 and #60987, the underlying pieces to enable pipelined
compilation support in Cargo. The issues have had some discussion during
stabilization, but the newly stabilized surface area here is:

* A new `--json` flag was added to the compiler.
* The `--json` flag can be passed multiple times.
* The value of the `--json` flag is a comma-separated list of
  directives.
* The `--json` flag cannot be combined with `--color`
* The `--json` flag must be combined with `--error-format=json`
* The acceptable list of directives to `--json` are:
  * `diagnostic-short` - the `rendered` field of diagnostics will have a
    "short" rendering matching `--error-format=short`
  * `diagnostic-rendered-ansi` - the `rendered` field of diagnostics
    will be colorized with ansi color codes embedded in the string field
  * `artifacts` - JSON blobs will be emitted for artifacts being emitted
    by the compiler

The unstable `-Z emit-artifact-notifications` and `--json-rendered`
flags have also been removed during this commit as well.

Closes #60419
Closes #60987
Closes #60988

4 years agoAllow 'incomplete_features' in libcore/alloc.
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:01:38 +0000 (02:01 +0200)]
Allow 'incomplete_features' in libcore/alloc.

4 years agoTurn INCOMPLETE_FEATURES into a lint.
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:00:53 +0000 (02:00 +0200)]
Turn INCOMPLETE_FEATURES into a lint.

4 years agoAuto merge of #63124 - Centril:rollup-onohtqt, r=Centril
bors [Tue, 30 Jul 2019 03:38:54 +0000 (03:38 +0000)]
Auto merge of #63124 - Centril:rollup-onohtqt, r=Centril

Rollup of 12 pull requests

Successful merges:

 - #61965 (Remove mentions of removed `offset_to` method from `align_offset` docs)
 - #62928 (Syntax: Recover on `for ( $pat in $expr ) $block`)
 - #63000 (Impl Debug for Chars)
 - #63083 (Make generic parameters always use modern hygiene)
 - #63087 (Add very simple edition check to tidy.)
 - #63093 (Properly check the defining scope of existential types)
 - #63096 (Add tests for some `existential_type` ICEs)
 - #63099 (vxworks: Remove Linux-specific comments.)
 - #63106 (ci: Skip installing SWIG/xz on OSX )
 - #63108 (Add links to None in Option doc)
 - #63109 (std: Fix a failing `fs` test on Windows)
 - #63111 (Add syntactic and semantic tests for rest patterns, i.e. `..`)

Failed merges:

r? @ghost

4 years agoRollup merge of #63111 - Centril:rest-pat-tests, r=estebank
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:46 +0000 (05:37 +0200)]
Rollup merge of #63111 - Centril:rest-pat-tests, r=estebank

Add syntactic and semantic tests for rest patterns, i.e. `..`

As per my first note in https://github.com/rust-lang/rust/issues/62254#issuecomment-515784884 this adds syntactic and semantic tests for `..` ("rest") patterns which were implemented in https://github.com/rust-lang/rust/pull/62550.

r? @estebank

4 years agoRollup merge of #63109 - alexcrichton:disable-windows-fs-test, r=sfackler
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:44 +0000 (05:37 +0200)]
Rollup merge of #63109 - alexcrichton:disable-windows-fs-test, r=sfackler

std: Fix a failing `fs` test on Windows

In testing 4-core machines on Azure the `realpath_works_tricky` test in
the standard library is failing with "The directory name is invalid". In
attempting to debug this test I was able to reproduce the failure
locally on my machine, and after inspecing the test it I believe is
exploiting Unix-specific behavior that seems to only sometimes work on
Windows. Specifically the test basically executes:

    mkdir -p a/b
    mkdir -p a/d
    touch a/f
    ln -s a/b/c ../d/e
    ln -s a/d/e ../f

and then asserts that `canonicalize("a/b/c")` and
`canonicalize("a/d/e")` are equivalent to `a/f`. On Windows however the
first symlink is a "directory symlink" and the second is a file symlink.
In both cases, though, they're pointing to files. This means that for
whatever reason locally and on the 4-core environment the call to
`canonicalize` is failing. On Azure today it seems to be passing, and
I'm not entirely sure why. I'm sort of presuming that there's some sort
of internals going on here where there's some global Windows setting
which makes symlinks behavior more unix-like and ignore the directory
hint.

In any case this should keep the test working and also fixes the test
locally for me. It's also worth pointing out that this test was made Windows compatible in https://github.com/rust-lang/rust/pull/31360, a pretty ancient PR at this point.

4 years agoRollup merge of #63108 - lzutao:option-xor-typo, r=jonas-schievink
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:43 +0000 (05:37 +0200)]
Rollup merge of #63108 - lzutao:option-xor-typo, r=jonas-schievink

Add links to None in Option doc

r? @jonas-schievink

4 years agoRollup merge of #63106 - alexcrichton:remove-swig-osx, r=pietroalbini
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:41 +0000 (05:37 +0200)]
Rollup merge of #63106 - alexcrichton:remove-swig-osx, r=pietroalbini

ci: Skip installing SWIG/xz on OSX

I'm relatively certain that SWIG was only needed for LLDB which is no
longer built, and I'm hoping we can remove the xz install to remove the
reliance on `brew` for our build (which is another point of failure for
flaky networks).

4 years agoRollup merge of #63099 - josephlr:vxworks, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:40 +0000 (05:37 +0200)]
Rollup merge of #63099 - josephlr:vxworks, r=alexcrichton

vxworks: Remove Linux-specific comments.

It looks like the VxWorks fork inadvertently left in some Linux-specific workaround comments in `libstd`, these can be removed. Came up when looking into #62516

CC: @BaoshanPang
4 years agoRollup merge of #63096 - Centril:existential-type-add-tests, r=varkor
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:39 +0000 (05:37 +0200)]
Rollup merge of #63096 - Centril:existential-type-add-tests, r=varkor

Add tests for some `existential_type` ICEs

Fix #53678
Fix #60407
Fix #60564

https://github.com/rust-lang/rust/issues/54899 will need some minimization before it can be added.

r? @varkor

4 years agoRollup merge of #63093 - Aaron1011:fix/existential-closure, r=cramertj
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:37 +0000 (05:37 +0200)]
Rollup merge of #63093 - Aaron1011:fix/existential-closure, r=cramertj

Properly check the defining scope of existential types

Fixes #52632

Existential types (soon to be 'impl trait' aliases) can either be
delcared at a top-level crate/module scope, or within another item such
as an fn. Previously, we were handling the second case incorrectly when
recursively searching for defining usages - we would check children of
the item, but not the item itself. This lead to us missing closures
that consituted a defining use of the existential type, as their opaque
type instantiations are stored in the TypeckTables of their parent
function.

This commit ensures that we explicitly visit the defining item itself,
not just its children.

4 years agoRollup merge of #63087 - crlf0710:tidy_2018, r=Mark-Simulacrum
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:36 +0000 (05:37 +0200)]
Rollup merge of #63087 - crlf0710:tidy_2018, r=Mark-Simulacrum

Add very simple edition check to tidy.

Fixes #58099.

4 years agoRollup merge of #63083 - matthewjasper:parameter-hygiene, r=petrochenkov
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:34 +0000 (05:37 +0200)]
Rollup merge of #63083 - matthewjasper:parameter-hygiene, r=petrochenkov

Make generic parameters always use modern hygiene

* E0263 (lifetime parameter declared twice in the same scope) now compares modernized identifiers.
* Const parameters are now resolved with modern hygiene.

Closes #58307
Closes #60746
Closes #61574
Closes #62433

4 years agoRollup merge of #63000 - max-sixty:chars-display, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:33 +0000 (05:37 +0200)]
Rollup merge of #63000 - max-sixty:chars-display, r=alexcrichton

Impl Debug for Chars

Closes https://github.com/rust-lang/rust/issues/62947, making `Debug` more consistent with the struct's output and purpose

Let me know any feedback!

4 years agoRollup merge of #62928 - Centril:recover-parens-around-for-head, r=estebank
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:32 +0000 (05:37 +0200)]
Rollup merge of #62928 - Centril:recover-parens-around-for-head, r=estebank

Syntax: Recover on `for ( $pat in $expr ) $block`

Fixes #62724 by adding some recovery:

```
error: unexpected closing `)`
  --> $DIR/recover-for-loop-parens-around-head.rs:10:23
   |
LL |     for ( elem in vec ) {
   |         --------------^
   |         |
   |         opening `(`
   |         help: remove parenthesis in `for` loop: `elem in vec`
```

The last 2 commits are drive-by cleanups.

r? @estebank

4 years agoRollup merge of #61965 - phil-opp:patch-4, r=scottmcm
Mazdak Farrokhzad [Tue, 30 Jul 2019 03:37:30 +0000 (05:37 +0200)]
Rollup merge of #61965 - phil-opp:patch-4, r=scottmcm

Remove mentions of removed `offset_to` method from `align_offset` docs

The `offset_to` method was deleted in https://github.com/rust-lang/rust/pull/52814.

The replacement for the removed method is `wrapping_offset_from`. However, neither method takes an `usize` as argument, so I don't think that it makes sense to mention them.

4 years agoAdd the necessary changes to any.rs
TankhouseAle [Tue, 30 Jul 2019 03:02:29 +0000 (23:02 -0400)]
Add the necessary changes to any.rs

Specifically the `#[rustc_const_unstable(feature = "const_type_name")]` attribute, as well as marking the actual function as `const`.

4 years agoAdd a test for std::any::type_name() as a const fn
TankhouseAle [Tue, 30 Jul 2019 02:57:21 +0000 (22:57 -0400)]
Add a test for std::any::type_name() as a const fn

This is a modified version of the test I added previously. The difference is this version implements a wrapper around std::any::type_name versus core::intrinsics::type_name, in order to show that it works as desired / intended.

4 years agoAdd semantic test for rest patterns.
Mazdak Farrokhzad [Mon, 29 Jul 2019 19:04:32 +0000 (21:04 +0200)]
Add semantic test for rest patterns.

4 years agoAdd another test for const parameter (non) hygiene.
Matthew Jasper [Mon, 29 Jul 2019 19:04:07 +0000 (20:04 +0100)]
Add another test for const parameter (non) hygiene.

4 years agoAdd syntactic test for rest patterns.
Mazdak Farrokhzad [Mon, 29 Jul 2019 07:03:27 +0000 (09:03 +0200)]
Add syntactic test for rest patterns.

4 years agoAdd very simple edition check to tidy; and add missing edition = 2018s.
CrLF0710 [Sun, 28 Jul 2019 17:05:31 +0000 (01:05 +0800)]
Add very simple edition check to tidy; and add missing edition = 2018s.

4 years agostd: Fix a failing `fs` test on Windows
Alex Crichton [Mon, 29 Jul 2019 17:37:36 +0000 (10:37 -0700)]
std: Fix a failing `fs` test on Windows

In testing 4-core machines on Azure the `realpath_works_tricky` test in
the standard library is failing with "The directory name is invalid". In
attempting to debug this test I was able to reproduce the failure
locally on my machine, and after inspecing the test it I believe is
exploiting Unix-specific behavior that seems to only sometimes work on
Windows. Specifically the test basically executes:

    mkdir -p a/b
    mkdir -p a/d
    touch a/f
    ln -s a/b/c ../d/e
    ln -s a/d/e ../f

and then asserts that `canonicalize("a/b/c")` and
`canonicalize("a/d/e")` are equivalent to `a/f`. On Windows however the
first symlink is a "directory symlink" and the second is a file symlink.
In both cases, though, they're pointing to files. This means that for
whatever reason locally and on the 4-core environment the call to
`canonicalize` is failing. On Azure today it seems to be passing, and
I'm not entirely sure why. I'm sort of presuming that there's some sort
of internals going on here where there's some global Windows setting
which makes symlinks behavior more unix-like and ignore the directory
hint.

In any case this should keep the test working and also fixes the test
locally for me.

4 years agouse gloabl variable 'environ' to pass environments to rtpSpawn
Baoshan Pang [Mon, 29 Jul 2019 17:19:59 +0000 (10:19 -0700)]
use gloabl variable 'environ' to pass environments to rtpSpawn

4 years agocomments from @lzutao
Maximilian Roos [Mon, 29 Jul 2019 16:26:59 +0000 (12:26 -0400)]
comments from @lzutao

4 years agoimpl Debug for Chars
Maximilian Roos [Fri, 26 Jul 2019 06:58:37 +0000 (02:58 -0400)]
impl Debug for Chars

4 years agoAdd links to None in Option doc
Lzu Tao [Mon, 29 Jul 2019 15:56:40 +0000 (15:56 +0000)]
Add links to None in Option doc

4 years agoci: Skip installing SWIG/xz on OSX
Alex Crichton [Mon, 29 Jul 2019 14:33:48 +0000 (07:33 -0700)]
ci: Skip installing SWIG/xz on OSX

I'm relatively certain that SWIG was only needed for LLDB which is no
longer built, and I'm hoping we can remove the xz install to remove the
reliance on `brew` for our build (which is another point of failure for
flaky networks).

4 years agoAuto merge of #63089 - kennytm:use-try-run-for-linkchecker, r=Mark-Simulacrum
bors [Mon, 29 Jul 2019 10:21:33 +0000 (10:21 +0000)]
Auto merge of #63089 - kennytm:use-try-run-for-linkchecker, r=Mark-Simulacrum

Fix rustc-guide build failure ignoring no-fail-fast

4 years agovxworks: Remove Linux-specific comments.
Joe Richey [Mon, 29 Jul 2019 06:09:21 +0000 (23:09 -0700)]
vxworks: Remove Linux-specific comments.

4 years agoAdd test for #60564.
Mazdak Farrokhzad [Mon, 29 Jul 2019 02:08:04 +0000 (04:08 +0200)]
Add test for #60564.

4 years agoAdd test for #60407.
Mazdak Farrokhzad [Mon, 29 Jul 2019 02:07:51 +0000 (04:07 +0200)]
Add test for #60407.

4 years agoAdd test for #53678.
Mazdak Farrokhzad [Mon, 29 Jul 2019 02:07:33 +0000 (04:07 +0200)]
Add test for #53678.

4 years agoMove ui/existential_type.rs -> ui/existential_type/existential_type-pass.
Mazdak Farrokhzad [Mon, 29 Jul 2019 01:38:49 +0000 (03:38 +0200)]
Move ui/existential_type.rs -> ui/existential_type/existential_type-pass.

4 years agoMove ui/{existential-type -> existential_types}.
Mazdak Farrokhzad [Mon, 29 Jul 2019 01:27:46 +0000 (03:27 +0200)]
Move ui/{existential-type -> existential_types}.

4 years agoFix rustc-guide build failure ignoring no-fail-fast.
kennytm [Sun, 28 Jul 2019 17:51:46 +0000 (01:51 +0800)]
Fix rustc-guide build failure ignoring no-fail-fast.

This caused clippy not being built on Linux previously.

4 years agoAuto merge of #63094 - Centril:rollup-lm7peuh, r=Centril
bors [Mon, 29 Jul 2019 00:12:12 +0000 (00:12 +0000)]
Auto merge of #63094 - Centril:rollup-lm7peuh, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #62809 (rustc: Update wasm32 support for LLVM 9)
 - #63055 (Various cleanups to save analysis)
 - #63076 (Miri: fix determining size of an "extra function" allocation)
 - #63077 (cleanup: Remove some language features related to built-in macros)
 - #63086 (Ignore test cases that are not supported by vxWorks)
 - #63092 (Update `impl Trait` gate issues)

Failed merges:

r? @ghost

4 years agoRollup merge of #63092 - Centril:update-impl-trait-gates, r=varkor
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:11:00 +0000 (02:11 +0200)]
Rollup merge of #63092 - Centril:update-impl-trait-gates, r=varkor

Update `impl Trait` gate issues

cc https://github.com/rust-lang/rust/issues/63065
cc https://github.com/rust-lang/rust/issues/63063

r? @varkor cc @alexreg

4 years agoRollup merge of #63086 - BaoshanPang:testcases, r=nagisa
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:10:58 +0000 (02:10 +0200)]
Rollup merge of #63086 - BaoshanPang:testcases, r=nagisa

Ignore test cases that are not supported by vxWorks

bypass x86stdcall.rs for vxworks

ignore wait-forked-but-failed-child.rs as there is no command 'ps' on vxWorks

ignore process-sigpipe.rs as there is no 'sh' on vxWorks

ignore core-run-destroy.rs as there is no 'cat' and 'sleep' on vxWorks

4 years agoRollup merge of #63077 - petrochenkov:nolangfeat, r=petrochenkov
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:10:57 +0000 (02:10 +0200)]
Rollup merge of #63077 - petrochenkov:nolangfeat, r=petrochenkov

cleanup: Remove some language features related to built-in macros

They are now library features.
Cleanup after https://github.com/rust-lang/rust/pull/62086.
The unstable book files are moved because tidy complained.

4 years agoRollup merge of #63076 - RalfJung:miri-fn-ptr-alloc-size, r=oli-obk
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:10:55 +0000 (02:10 +0200)]
Rollup merge of #63076 - RalfJung:miri-fn-ptr-alloc-size, r=oli-obk

Miri: fix determining size of an "extra function" allocation

Fixes [a bug](https://github.com/rust-lang/miri/pull/862) introduced by https://github.com/rust-lang/rust/pull/62982. Best reviewed commit-by-commit.

r? @oli-obk

4 years agoRollup merge of #63055 - Mark-Simulacrum:save-analysis-clean-2, r=Xanewok
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:10:54 +0000 (02:10 +0200)]
Rollup merge of #63055 - Mark-Simulacrum:save-analysis-clean-2, r=Xanewok

Various cleanups to save analysis

4 years agoRollup merge of #62809 - alexcrichton:wasm-llvm-9, r=nikic
Mazdak Farrokhzad [Mon, 29 Jul 2019 00:10:52 +0000 (02:10 +0200)]
Rollup merge of #62809 - alexcrichton:wasm-llvm-9, r=nikic

rustc: Update wasm32 support for LLVM 9

This commit brings in a number of minor updates for rustc's support for
the wasm target which has changed in the LLVM 9 update. Notable updates
include:

* The compiler now no longer manually inserts the `producers` section,
  instead relying on LLVM to do so. LLVM uses the `llvm.ident` metadata
  for the `processed-by` directive (which is now emitted on the wasm
  target in this PR) and it uses debuginfo to figure out what `language`
  to put in the `producers` section.

* Threaded WebAssembly code now requires different flags to be passed
  with LLD. In LLD we now pass:

  * `--shared-memory` - required since objects are compiled with
    atomics. This also means that the generated memory will be marked as
    `shared`.
  * `--max-memory=1GB` - required with the `--shared-memory` argument
    since shared memories in WebAssembly must have a maximum size. The
    1GB number is intended to be a conservative estimate for rustc, but
    it should be overridable with `-C link-arg` if necessary.
  * `--passive-segments` - this has become the default for multithreaded
    memory, but when compiling a threaded module all data segments need
    to be marked as passive to ensure they don't re-initialize memory
    for each thread. This will also cause LLD to emit a synthetic
    function to initialize memory which users will have to arrange to
    call.
  * The `__heap_base` and `__data_end` globals are explicitly exported
    since they're now hidden by default due to the `--export` flags we
    pass to LLD.

4 years agoRename test and add comment
Aaron Hill [Sun, 28 Jul 2019 23:12:04 +0000 (19:12 -0400)]
Rename test and add comment

4 years agoFix formatting
Aaron Hill [Sun, 28 Jul 2019 22:33:32 +0000 (18:33 -0400)]
Fix formatting

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
4 years agoUpdate existential_type + impl_trait_in_bindings issue numbers.
Mazdak Farrokhzad [Sun, 28 Jul 2019 21:39:39 +0000 (23:39 +0200)]
Update existential_type + impl_trait_in_bindings issue numbers.

4 years agoProperly check the defining scope of existential types
Aaron Hill [Sun, 28 Jul 2019 21:57:04 +0000 (17:57 -0400)]
Properly check the defining scope of existential types

Fixes #52632

Existential types (soon to be 'impl trait' aliases) can either be
delcared at a top-level crate/module scope, or within another item such
as an fn. Previously, we were handling the second case incorrectly when
recursively searching for defining usages - we would check children of
the item, but not the item itself. This lead to us missing closures
that consituted a defining use of the existential type, as their opaque
type instantiations are stored in the TypeckTables of their parent
function.

This commit ensures that we explicitly visit the defining item itself,
not just its children.

4 years agoreplace match by ok()
Ralf Jung [Sun, 28 Jul 2019 20:30:19 +0000 (22:30 +0200)]
replace match by ok()

4 years agoAuto merge of #63090 - Centril:rollup-xnjwm2h, r=Centril
bors [Sun, 28 Jul 2019 20:22:42 +0000 (20:22 +0000)]
Auto merge of #63090 - Centril:rollup-xnjwm2h, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #61856 (Lint attributes on function arguments)
 - #62360 (Document that ManuallyDrop::drop should not called more than once)
 - #62392 (Update minifier-rs version)
 - #62871 (Explicit error message for async recursion.)
 - #62995 (Avoid ICE when suggestion span is at Eof)
 - #63053 (SystemTime docs: recommend Instant for elapsed time)
 - #63081 (tidy: Cleanup the directory whitelist)
 - #63088 (Remove anonymous_parameters from unrelated test)

Failed merges:

r? @ghost

4 years agoRollup merge of #63088 - dtolnay:anonymous, r=Centril
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:20:02 +0000 (21:20 +0200)]
Rollup merge of #63088 - dtolnay:anonymous, r=Centril

Remove anonymous_parameters from unrelated test

The parsing of anonymous_parameters is sufficiently covered by:

- [src/test/ui/issues/issue-13105.rs](https://github.com/rust-lang/rust/blob/023525dbda35748a10713471b948974b68a1c2cc/src/test/ui/issues/issue-13105.rs)
- [src/test/ui/issues/issue-13775.rs](https://github.com/rust-lang/rust/blob/023525dbda35748a10713471b948974b68a1c2cc/src/test/ui/issues/issue-13775.rs)
- [src/test/ui/issues/issue-34074.rs](https://github.com/rust-lang/rust/blob/023525dbda35748a10713471b948974b68a1c2cc/src/test/ui/issues/issue-34074.rs)

Removing anonymous_parameters from this test means fewer exclusions for me in https://github.com/dtolnay/syn/issues/644.

4 years agoRollup merge of #63081 - petrochenkov:cleantidy, r=Mark-Simulacrum
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:20:00 +0000 (21:20 +0200)]
Rollup merge of #63081 - petrochenkov:cleantidy, r=Mark-Simulacrum

tidy: Cleanup the directory whitelist

Some entries were outdated - pre-"llvm-project", pre-"crates.io", pre-"Cargo.toml outside of src".
Some entries were unnecessary - `owning_ref` could be fixed and directories outside of `src` are not visited by tidy at all.

r? @Mark-Simulacrum

4 years agoRollup merge of #63053 - kornelski:clockdrift, r=shepmaster
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:19:59 +0000 (21:19 +0200)]
Rollup merge of #63053 - kornelski:clockdrift, r=shepmaster

SystemTime docs: recommend Instant for elapsed time

Introduction to `SystemTime` mentions problems with non-monotonic clocks, but individual methods don't.

For benefit of users who jump directly to method's documentation, also recommend `Instant` in `elapsed` and `duration_since`.

`SystemTime::elapsed()` docs overpromised the elapsed time. It's not elapsed time, but a difference between two clocks.

4 years agoRollup merge of #62995 - estebank:issue-62973, r=varkor
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:19:58 +0000 (21:19 +0200)]
Rollup merge of #62995 - estebank:issue-62973, r=varkor

Avoid ICE when suggestion span is at Eof

Fix #62973.

4 years agoRollup merge of #62871 - gilescope:async-recursion-error, r=Centril
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:19:56 +0000 (21:19 +0200)]
Rollup merge of #62871 - gilescope:async-recursion-error, r=Centril

Explicit error message for async recursion.

Attempt at clearer error message when async recusion is attempted. In response to #62539 (and #53690).

4 years agoRollup merge of #62392 - GuillaumeGomez:update-minifier, r=GuillaumeGomez
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:19:54 +0000 (21:19 +0200)]
Rollup merge of #62392 - GuillaumeGomez:update-minifier, r=GuillaumeGomez

Update minifier-rs version

The `main.js` file size goes from 52868 to 50134. A few fixes have been included as well (no more eluded parts of js files).

r? @QuietMisdreavus

4 years agoRollup merge of #62360 - Aaron1011:patch-2, r=RalfJung
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:19:52 +0000 (21:19 +0200)]
Rollup merge of #62360 - Aaron1011:patch-2, r=RalfJung

Document that ManuallyDrop::drop should not called more than once

Double dropping is unsound (e.g. https://github.com/rust-lang/rust/issues/60977). This commit documents the fact that `ManuallyDrop::drop` should not be called multiple times on the same instance, as it might not be immediately obvious that this counts as a use of uninitialized data.

4 years agoRollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasper
Mazdak Farrokhzad [Sun, 28 Jul 2019 19:19:50 +0000 (21:19 +0200)]
Rollup merge of #61856 - c410-f3r:attrs-fn, r=matthewjasper

Lint attributes on function arguments

Fixes #61238.

cc #60406

4 years agoAdd 'span_to_snippet' shortcut.
Mazdak Farrokhzad [Wed, 24 Jul 2019 09:01:30 +0000 (11:01 +0200)]
Add 'span_to_snippet' shortcut.

4 years agoUse chaining for diagnosics in parser.
Mazdak Farrokhzad [Wed, 24 Jul 2019 08:51:20 +0000 (10:51 +0200)]
Use chaining for diagnosics in parser.

4 years agoRecover 'for ( $pat in $expr ) $block'.
Mazdak Farrokhzad [Wed, 24 Jul 2019 08:26:32 +0000 (10:26 +0200)]
Recover 'for ( $pat in $expr ) $block'.

4 years agoUpdate minifier-rs version
Guillaume Gomez [Sun, 28 Jul 2019 18:24:52 +0000 (20:24 +0200)]
Update minifier-rs version

4 years agoRemove anonymous_parameters from unrelated test
David Tolnay [Sun, 28 Jul 2019 17:17:19 +0000 (10:17 -0700)]
Remove anonymous_parameters from unrelated test

4 years agobypass x86stdcall.rs for vxworks
Baoshan Pang [Sun, 28 Jul 2019 16:15:43 +0000 (09:15 -0700)]
bypass x86stdcall.rs for vxworks

ignore wait-forked-but-failed-child.rs as there is no command 'ps' on vxWorks

ignore process-sigpipe.rs as there is no 'sh' on vxWorks

ignore core-run-destroy.rs as there is no 'cat' and 'sleep' on vxWorks

4 years agoAuto merge of #62910 - petrochenkov:buildwarn2, r=Mark-Simulacrum
bors [Sun, 28 Jul 2019 16:34:59 +0000 (16:34 +0000)]
Auto merge of #62910 - petrochenkov:buildwarn2, r=Mark-Simulacrum

cleanup: Remove lint annotations in specific crates that are already enforced by rustbuild

Remove some random unnecessary lint `allow`s.

Deny `unused_lifetimes` through rustbuild.

r? @Mark-Simulacrum

4 years agoBetter recursive async fn error message.
Giles Cope [Tue, 23 Jul 2019 18:50:53 +0000 (19:50 +0100)]
Better recursive async fn error message.

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
4 years agoFix `cfg(parallel_compiler)` mode
Vadim Petrochenkov [Wed, 24 Jul 2019 08:44:14 +0000 (11:44 +0300)]
Fix `cfg(parallel_compiler)` mode

Fix rebase

4 years agoDeny `unused_lifetimes` through rustbuild
Vadim Petrochenkov [Tue, 23 Jul 2019 19:17:27 +0000 (22:17 +0300)]
Deny `unused_lifetimes` through rustbuild

4 years agoRemove lint annotations in specific crates that are already enforced by rustbuild
Vadim Petrochenkov [Tue, 23 Jul 2019 17:34:17 +0000 (20:34 +0300)]
Remove lint annotations in specific crates that are already enforced by rustbuild

Remove some random unnecessary lint `allow`s

4 years agoAuto merge of #62943 - matthiaskrgr:submodule_upd, r=matthiaskrgr
bors [Sun, 28 Jul 2019 12:50:34 +0000 (12:50 +0000)]
Auto merge of #62943 - matthiaskrgr:submodule_upd, r=matthiaskrgr

submodules: update clippy from 164310dd to dc69a5c0

Changes:
````
ci: temporarily disable rustfmt checks/tetss since it's broken for nightly
rustup https://github.com/rust-lang/rust/pull/62964
Bump version of clippy_dummy
update test stderr, not sure which rustc pull request caused this.
rustup https://github.com/rust-lang/rust/pull/62859
Fix tests for edition 2018 compatibility
Revert "Revert global fmt config and use `rustfmt::skip`"
Fix breakage due to rust-lang/rust#60913
Fix breakage due to rust-lang/rust#62705
Revert global fmt config and use `rustfmt::skip`
Fix fmt
rustup https://github.com/rust-lang/rust/pull/62679/
Update pulldown-cmark to 0.5.3
rustup https://github.com/rust-lang/rust/pull/62764
Add test
Format code
Decrease maximum length for stderr files
Improved imports
Fix "unkown clippy lint" error in UI test.
Corrections for PR review.
Implement lint for inherent to_string() method.
UI Test Cleanup: Extract match_ref_pats tests
Update UI tests
Allow no_effect lint
Remove comment
cargo fmt
UI Test Cleanup: Split up checked_unwrap tests
Removed lintining on never type.
UI Test Cleanup: Split out out_of_bounds_indexing
false positives fixes of `implicit_return`
Ignore generated fresh lifetimes in elision check.
````

fixes clippy toolstate
r? @Manishearth

4 years agoResolve const parameters with modern hygiene
Matthew Jasper [Sun, 28 Jul 2019 12:34:03 +0000 (13:34 +0100)]
Resolve const parameters with modern hygiene

Declarations were already modernized, resulting in cases where a macro
couldn't resolve it's own identifier.

4 years agoDisallow duplicate lifetime parameters with legacy hygiene
Matthew Jasper [Sun, 28 Jul 2019 12:33:51 +0000 (13:33 +0100)]
Disallow duplicate lifetime parameters with legacy hygiene

They were resolved with modern hygiene, making this just a strange way
to shadow lifetimes.

4 years agotidy: Cleanup the directory whitelist
Vadim Petrochenkov [Sun, 28 Jul 2019 11:36:26 +0000 (14:36 +0300)]
tidy: Cleanup the directory whitelist

4 years agoget_size_and_align: fix handling of function pointers
Ralf Jung [Sun, 28 Jul 2019 11:02:01 +0000 (13:02 +0200)]
get_size_and_align: fix handling of function pointers

4 years agocleanup: Remove some language features related to built-in macros
Vadim Petrochenkov [Sun, 28 Jul 2019 11:02:08 +0000 (14:02 +0300)]
cleanup: Remove some language features related to built-in macros

They are now library features.

4 years agomiri: add get and get_mut to AllocMap; use that in get_size_and_align and avoid right...
Ralf Jung [Sun, 28 Jul 2019 10:58:39 +0000 (12:58 +0200)]
miri: add get and get_mut to AllocMap; use that in get_size_and_align and avoid rightwards drift

4 years agoSystemTime docs: recommend Instant for elapsed time
Kornel [Sat, 27 Jul 2019 20:46:18 +0000 (21:46 +0100)]
SystemTime docs: recommend Instant for elapsed time

4 years agoAuto merge of #63074 - Centril:rollup-k1a8z0n, r=Centril
bors [Sun, 28 Jul 2019 09:12:04 +0000 (09:12 +0000)]
Auto merge of #63074 - Centril:rollup-k1a8z0n, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #62550 (Implement RFC 2707 + Parser recovery for range patterns)
 - #62759 (Actually add rustc-guide to toolstate, don't fail builds for the guide)
 - #62806 (Fix few Clippy warnings)
 - #62974 (bump crossbeam-epoch dependency)
 - #63051 (Avoid ICE when referencing desugared local binding in borrow error)
 - #63061 (In which we constantly improve the Vec(Deque) array PartialEq impls)
 - #63067 (Add test for issue-50900)
 - #63071 (Allow rustbot to add `F-*` + `requires-nightly`.)

Failed merges:

r? @ghost

4 years agoRollup merge of #63071 - rust-lang:some-new-labels, r=pietroalbini
Mazdak Farrokhzad [Sun, 28 Jul 2019 09:11:16 +0000 (11:11 +0200)]
Rollup merge of #63071 - rust-lang:some-new-labels, r=pietroalbini

Allow rustbot to add `F-*` + `requires-nightly`.

r? @pietroalbini

4 years agoRollup merge of #63067 - JohnTitor:test-for-50900, r=Centril
Mazdak Farrokhzad [Sun, 28 Jul 2019 09:11:15 +0000 (11:11 +0200)]
Rollup merge of #63067 - JohnTitor:test-for-50900, r=Centril

Add test for issue-50900

Closes #50900