]> git.lizzy.rs Git - rust.git/log
rust.git
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 agothrow_X macros use err_X macros
Saleem Jaffer [Tue, 30 Jul 2019 15:06:17 +0000 (20:36 +0530)]
throw_X macros use err_X macros

4 years agorenaming throw_err_* to throw_*
Saleem Jaffer [Tue, 30 Jul 2019 14:48:50 +0000 (20:18 +0530)]
renaming throw_err_* to throw_*

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 agorenaming err to err_unsup
Saleem Jaffer [Tue, 30 Jul 2019 10:38:32 +0000 (16:08 +0530)]
renaming err to err_unsup

4 years agotidy fixes
Saleem Jaffer [Tue, 30 Jul 2019 10:16:02 +0000 (15:46 +0530)]
tidy fixes

4 years agoadding throw_ and err_ macros for InterpError
Saleem Jaffer [Tue, 30 Jul 2019 09:55:12 +0000 (15:25 +0530)]
adding throw_ and err_ macros for InterpError

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 agoaddding an interp_error module
Saleem Jaffer [Tue, 30 Jul 2019 07:48:36 +0000 (13:18 +0530)]
addding an interp_error module

4 years agocode review fixes
Saleem Jaffer [Tue, 30 Jul 2019 07:02:43 +0000 (12:32 +0530)]
code review fixes

4 years agoreview comments
Esteban Küber [Tue, 30 Jul 2019 04:43:54 +0000 (21:43 -0700)]
review comments

4 years agoImprove handling of invalid references in `format!()`
Esteban Küber [Tue, 30 Jul 2019 04:24:10 +0000 (21:24 -0700)]
Improve handling of invalid references in `format!()`

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 agoAccount for maybe_whole_expr in range patterns.
Mazdak Farrokhzad [Tue, 30 Jul 2019 02:22:09 +0000 (04:22 +0200)]
Account for maybe_whole_expr in range patterns.

4 years agoOn `format!()` arg count mismatch provide extra info
Esteban Küber [Tue, 30 Jul 2019 01:19:21 +0000 (18:19 -0700)]
On `format!()` arg count mismatch provide extra info

When positional width and precision formatting flags are present in a
formatting string that has an argument count mismatch, provide extra
information pointing at them making it easiser to understand where the
problem may lay:

```
error: 4 positional arguments in format string, but there are 3 arguments
  --> $DIR/ifmt-bad-arg.rs:78:15
   |
LL |     println!("{} {:.*} {}", 1, 3.2, 4);
   |               ^^ ^^--^ ^^      --- this parameter corresponds to the precision flag
   |                    |
   |                    this precision flag adds an extra required argument at position 1, which is why there are 4 arguments expected
   |
   = note: positional arguments are zero-based
   = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html

error: 4 positional arguments in format string, but there are 3 arguments
  --> $DIR/ifmt-bad-arg.rs:81:15
   |
LL |     println!("{} {:07$.*} {}", 1, 3.2, 4);
   |               ^^ ^^-----^ ^^      --- this parameter corresponds to the precision flag
   |                    |  |
   |                    |  this precision flag adds an extra required argument at position 1, which is why there are 4 arguments expected
   |                    this width flag expects an `usize` argument at position 7, but there are 3 arguments
   |
   = note: positional arguments are zero-based
   = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html

error: 3 positional arguments in format string, but there are 3 arguments
  --> $DIR/ifmt-bad-arg.rs:84:15
   |
LL |     println!("{} {:07$} {}", 1, 3.2, 4);
   |               ^^ ^^---^ ^^
   |                    |
   |                    this width flag expects an `usize` argument at position 7, but there are 3 arguments
   |
   = note: positional arguments are zero-based
   = note: for information about formatting flags, visit https://doc.rust-lang.org/std/fmt/index.html
```

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 agorustc: Compile the `fmt_macros` crate as an rlib
Alex Crichton [Fri, 19 Jul 2019 20:06:31 +0000 (13:06 -0700)]
rustc: Compile the `fmt_macros` crate as an rlib

I think this was left out by accident from the "convert everything to
rlibs" commit, there's no need for this to be a dylib just as everything
else doesn't need to be a dylib!

4 years agocode review fixes
Saleem Jaffer [Mon, 29 Jul 2019 14:56:25 +0000 (20:26 +0530)]
code review fixes

4 years agocode review fixes
Saleem Jaffer [Mon, 29 Jul 2019 14:47:52 +0000 (20:17 +0530)]
code review fixes

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 agocode review fixes
Saleem Jaffer [Mon, 29 Jul 2019 08:11:32 +0000 (13:41 +0530)]
code review fixes

4 years agouse PanicInfo and UnsupportedOpInfo
Saleem Jaffer [Mon, 29 Jul 2019 07:58:55 +0000 (13:28 +0530)]
use PanicInfo and UnsupportedOpInfo

4 years agoadding a err macro for each of the InterpError variants
Saleem Jaffer [Mon, 29 Jul 2019 07:36:42 +0000 (13:06 +0530)]
adding a err macro for each of the InterpError variants

4 years agoimplementing Debug for UnsupportedInfo
Saleem Jaffer [Sun, 28 Jul 2019 14:37:33 +0000 (20:07 +0530)]
implementing Debug for UnsupportedInfo

4 years agotidy fixes
Saleem Jaffer [Sat, 27 Jul 2019 12:26:45 +0000 (17:56 +0530)]
tidy fixes

4 years agofixing fallout due to InterpError refactor
Saleem Jaffer [Sat, 27 Jul 2019 12:19:12 +0000 (17:49 +0530)]
fixing fallout due to InterpError refactor

4 years agocode review fixes
Saleem Jaffer [Fri, 26 Jul 2019 13:38:12 +0000 (19:08 +0530)]
code review fixes

4 years agomoving remaining variants to UnsupportedInfo
Saleem Jaffer [Fri, 26 Jul 2019 11:01:12 +0000 (16:31 +0530)]
moving remaining variants to UnsupportedInfo

4 years agomore grouping of the variants in InterpError
Saleem Jaffer [Fri, 26 Jul 2019 09:58:27 +0000 (15:28 +0530)]
more grouping of the variants in InterpError

4 years agogrouping the variants of InterpError
Saleem Jaffer [Fri, 26 Jul 2019 05:21:54 +0000 (10:51 +0530)]
grouping the variants of InterpError

4 years agochanging the fields of InterpError
Saleem Jaffer [Thu, 25 Jul 2019 11:29:38 +0000 (16:59 +0530)]
changing the fields of InterpError

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