]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #64284 - Mark-Simulacrum:include-warn, r=petrochenkov
Mazdak Farrokhzad [Tue, 8 Oct 2019 21:31:19 +0000 (23:31 +0200)]
Rollup merge of #64284 - Mark-Simulacrum:include-warn, r=petrochenkov

Warn if include macro fails to include entire file

This currently introduces an error, mainly because that was just simpler, and I'm not entirely certain if we can introduce a lint without an RFC and such.

This is primarily to get feedback on the approach and overall aim -- in particular, do we think this is helpful? If so, we probably will need lang-team sign off and decide if it should be an error (as currently introduced by this PR), a lint, or a warning.

r? @petrochenkov

cc https://github.com/rust-lang/rust/issues/35560

4 years agoAuto merge of #65209 - Centril:rollup-tzc0j87, r=Centril
bors [Tue, 8 Oct 2019 17:31:35 +0000 (17:31 +0000)]
Auto merge of #65209 - Centril:rollup-tzc0j87, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #64404 (Add long error explanation for E0495)
 - #64918 (Add long error explanation for E0551)
 - #65102 (Disable stack probe when thread sanitizer is enabled)
 - #65120 (Correctly estimate the required space for string in `StyledBuffer::prepend`)
 - #65145 (When suggesting assoc function with type params, include turbofish)
 - #65162 (Remove loaded_from_cache map from DepGraph)
 - #65176 (Remove query-related macros)
 - #65179 (Add long error explanation for E0567)

Failed merges:

r? @ghost

4 years agoRollup merge of #65179 - GuillaumeGomez:long-err-explanation-E0567, r=davidtwco
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:34 +0000 (15:45 +0200)]
Rollup merge of #65179 - GuillaumeGomez:long-err-explanation-E0567, r=davidtwco

Add long error explanation for E0567

Part of #61137.

4 years agoRollup merge of #65176 - nnethercote:rm-query-macros, r=michaelwoerister
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:32 +0000 (15:45 +0200)]
Rollup merge of #65176 - nnethercote:rm-query-macros, r=michaelwoerister

Remove query-related macros

The query system has a few macros that only have one or two call sites, and I find they hurt readability. This PR removes them.

r? @michaelwoerister

4 years agoRollup merge of #65162 - Mark-Simulacrum:no-cache-loading-map, r=michaelwoerister
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:31 +0000 (15:45 +0200)]
Rollup merge of #65162 - Mark-Simulacrum:no-cache-loading-map, r=michaelwoerister

Remove loaded_from_cache map from DepGraph

It's now unused, even with -Zquery-dep-graph

From https://github.com/rust-lang/rust/pull/63756/files#r316039379 -- it'll simplify that PR to get this landed separately so we can just remove some of the code that it touches.

r? @Zoxc or @michaelwoerister

4 years agoRollup merge of #65145 - estebank:turbofish-assoc-fn-call, r=varkor
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:29 +0000 (15:45 +0200)]
Rollup merge of #65145 - estebank:turbofish-assoc-fn-call, r=varkor

When suggesting assoc function with type params, include turbofish

Fix https://github.com/rust-lang/rust/issues/61412, fix https://github.com/rust-lang/rust/issues/61411.

4 years agoRollup merge of #65120 - AnthonyMikh:fix_65119, r=estebank
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:28 +0000 (15:45 +0200)]
Rollup merge of #65120 - AnthonyMikh:fix_65119, r=estebank

Correctly estimate the required space for string in `StyledBuffer::prepend`

Fix #65119

r? @estebank

4 years agoRollup merge of #65102 - tmiasko:tsan-probe-stack, r=alexcrichton
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:26 +0000 (15:45 +0200)]
Rollup merge of #65102 - tmiasko:tsan-probe-stack, r=alexcrichton

Disable stack probe when thread sanitizer is enabled

When thread sanitizer instrumentation is enabled during compilation of
stack probe function, the function will be miscompiled and trigger
segmentation fault at runtime. Disable stack probes when tsan is
enabled.

4 years agoRollup merge of #64918 - GuillaumeGomez:long-err-explanation-E0551, r=oli-obk
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:25 +0000 (15:45 +0200)]
Rollup merge of #64918 - GuillaumeGomez:long-err-explanation-E0551, r=oli-obk

Add long error explanation for E0551

Part of #61137

4 years agoRollup merge of #64404 - GuillaumeGomez:err-E0495, r=Dylan-DPC
Mazdak Farrokhzad [Tue, 8 Oct 2019 13:45:23 +0000 (15:45 +0200)]
Rollup merge of #64404 - GuillaumeGomez:err-E0495, r=Dylan-DPC

Add long error explanation for E0495

Part of #61137.

4 years agoAuto merge of #65206 - mati865:clippyup, r=oli-obk
bors [Tue, 8 Oct 2019 13:41:12 +0000 (13:41 +0000)]
Auto merge of #65206 - mati865:clippyup, r=oli-obk

Update Clippy

I cannot test it locally but Clippy CI is green so it should work.

Fixes https://github.com/rust-lang/rust/issues/65096

4 years agoUpdate Clippy
Mateusz Mikuła [Tue, 8 Oct 2019 12:14:09 +0000 (14:14 +0200)]
Update Clippy

4 years agoUpdate ui tests
Guillaume Gomez [Mon, 7 Oct 2019 12:08:26 +0000 (14:08 +0200)]
Update ui tests

4 years agoAdd long error explanation for E0567
Guillaume Gomez [Mon, 7 Oct 2019 10:59:39 +0000 (12:59 +0200)]
Add long error explanation for E0567

4 years agoAuto merge of #64949 - nnethercote:avoid-SmallVec-collect, r=zackmdavis
bors [Tue, 8 Oct 2019 08:08:21 +0000 (08:08 +0000)]
Auto merge of #64949 - nnethercote:avoid-SmallVec-collect, r=zackmdavis

Avoid `SmallVec::collect`

We can get sizeable speed-ups by avoiding `SmallVec::collect` when the number of elements is small.

4 years agoAuto merge of #65196 - Centril:rollup-q06lcxm, r=Centril
bors [Tue, 8 Oct 2019 04:35:03 +0000 (04:35 +0000)]
Auto merge of #65196 - Centril:rollup-q06lcxm, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #64726 (rewrite documentation for unimplemented! to clarify use)
 - #65040 (syntax: more cleanups in item and function signature parsing)
 - #65046 (Make `Cell::new` method come first in documentation)
 - #65098 (Add long error explanation for E0561)
 - #65150 (Suggest dereferencing boolean reference when used in 'if' or 'while')
 - #65154 (Fix const generic arguments not displaying in types mismatch diagnostic)
 - #65181 (fix bug in folding for constants)
 - #65187 (use 'invalid argument' for vxWorks)

Failed merges:

 - #65179 (Add long error explanation for E0567)

r? @ghost

4 years agoRollup merge of #65187 - Wind-River:master_before_merge, r=rkruppe
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:44 +0000 (05:02 +0200)]
Rollup merge of #65187 - Wind-River:master_before_merge, r=rkruppe

use 'invalid argument' for vxWorks

vxWorks is using "invalid argument" instead of "Invalid argument" in reporting invalid options

r? @rkruppe

4 years agoRollup merge of #65181 - nikomatsakis:lazy-norm-anon-const-push-1, r=varkor
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:43 +0000 (05:02 +0200)]
Rollup merge of #65181 - nikomatsakis:lazy-norm-anon-const-push-1, r=varkor

fix bug in folding for constants

These was a bug in the folding for constants that caused it to overlook bound regions. This branch includes some other little things that I did while trying to track the bug down.

r? @oli-obk

4 years agoRollup merge of #65154 - skinny121:const-arg-diagnostic, r=varkor
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:41 +0000 (05:02 +0200)]
Rollup merge of #65154 - skinny121:const-arg-diagnostic, r=varkor

Fix const generic arguments not displaying in types mismatch diagnostic

Fixes #61395

4 years agoRollup merge of #65150 - XiangQingW:master, r=estebank
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:39 +0000 (05:02 +0200)]
Rollup merge of #65150 - XiangQingW:master, r=estebank

Suggest dereferencing boolean reference when used in 'if' or 'while'

Implements #64557

4 years agoRollup merge of #65098 - GuillaumeGomez:long-err-explanation-E0561, r=Centril
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:38 +0000 (05:02 +0200)]
Rollup merge of #65098 - GuillaumeGomez:long-err-explanation-E0561, r=Centril

Add long error explanation for E0561

Part of #61137

4 years agoRollup merge of #65046 - sinkuu:cell_reorder, r=shepmaster
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:36 +0000 (05:02 +0200)]
Rollup merge of #65046 - sinkuu:cell_reorder, r=shepmaster

Make `Cell::new` method come first in documentation

Methods to create a thing usually comes first in `std` documentation, and `Cell` has been an exception. Also, `T: Copy` specialized methods should not be on top of the page. (This had led me to miss that most of its methods are not bounded by `Copy`...)

4 years agoRollup merge of #65040 - Centril:items-cleanup, r=estebank
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:35 +0000 (05:02 +0200)]
Rollup merge of #65040 - Centril:items-cleanup, r=estebank

syntax: more cleanups in item and function signature parsing

Follow up to https://github.com/rust-lang/rust/pull/64910.

Best read commit-by-commit.

r? @estebank

4 years agoRollup merge of #64726 - andrewbanchich:unimplemented, r=rkruppe
Mazdak Farrokhzad [Tue, 8 Oct 2019 03:02:33 +0000 (05:02 +0200)]
Rollup merge of #64726 - andrewbanchich:unimplemented, r=rkruppe

rewrite documentation for unimplemented! to clarify use

The current docs for `unimplemented!` seem to miss the point of this macro.

> This can be useful if you are prototyping and are just looking to have your code type-check, or if you're implementing a trait that requires multiple methods, and you're only planning on using one of them.

You could also return a `()` if you just want your code to type-check.

I think `unimplemented!` is useful for when you want your program to exit when it reaches an unimplemented area.

I rewrote the explanation and gave examples of both forms of this macro that I think clarify its use a little better.

4 years agoAuto merge of #65186 - mati865:cargoup, r=alexcrichton
bors [Tue, 8 Oct 2019 01:05:08 +0000 (01:05 +0000)]
Auto merge of #65186 - mati865:cargoup, r=alexcrichton

Update Cargo

To pull rust-lang/cargo#7482

List of merged PRs:
- Fix wrong directories in PATH on Windows (rust-lang/cargo#7482)
- Update SPDX list to 3.6 (rust-lang/cargo#7481)
- Mark Emscripten's .wasm files auxiliary (rust-lang/cargo#7476)
- Update `curl-sys` dependency requirement (rust-lang/cargo#7464)
- add dependencies for `pkg-config` (rust-lang/cargo#7443)
- Removing hash from output files when using MSVC (rust-lang/cargo#7400)
- Disable preserving mtimes on archives (rust-lang/cargo#7465)
- Removed redundant borrow (rust-lang/cargo#7462)
- Public dependency refactor and re-allow backjumping (rust-lang/cargo#7361)
- unify the quote in Cargo.toml (rust-lang/cargo#7461)

4 years agoWarn if include macro fails to include entire file
Mark Rousskov [Sun, 8 Sep 2019 14:00:26 +0000 (10:00 -0400)]
Warn if include macro fails to include entire file

4 years agoAuto merge of #64358 - cuviper:rustc-rayon-1.2, r=nikomatsakis
bors [Mon, 7 Oct 2019 21:24:29 +0000 (21:24 +0000)]
Auto merge of #64358 - cuviper:rustc-rayon-1.2, r=nikomatsakis

Rebase rustc-rayon on rayon-1.2

See also https://github.com/rust-lang/rustc-rayon/pull/3

4 years agoUpdate other rayon uses to 1.2 too
Josh Stone [Mon, 7 Oct 2019 20:44:30 +0000 (13:44 -0700)]
Update other rayon uses to 1.2 too

4 years agoadd crossbeam-queue to the whitelist
Josh Stone [Mon, 7 Oct 2019 20:43:10 +0000 (13:43 -0700)]
add crossbeam-queue to the whitelist

4 years agoName the threads in rayon's pool
Josh Stone [Thu, 12 Sep 2019 19:34:43 +0000 (12:34 -0700)]
Name the threads in rayon's pool

4 years agoRebase rustc-rayon on rayon-1.2
Josh Stone [Tue, 10 Sep 2019 17:13:07 +0000 (10:13 -0700)]
Rebase rustc-rayon on rayon-1.2

See also https://github.com/rust-lang/rustc-rayon/pull/3

4 years agouse 'invalid argument' for vxWorks
BaoshanPang [Mon, 7 Oct 2019 18:52:30 +0000 (11:52 -0700)]
use 'invalid argument' for vxWorks

4 years agoUpdate Cargo
Mateusz Mikuła [Mon, 7 Oct 2019 18:33:13 +0000 (20:33 +0200)]
Update Cargo

4 years agoAuto merge of #61430 - matthewjasper:drop-on-into-panic, r=oli-obk
bors [Mon, 7 Oct 2019 17:47:10 +0000 (17:47 +0000)]
Auto merge of #61430 - matthewjasper:drop-on-into-panic, r=oli-obk

Make `into` schedule drop for the destination

closes #47949

4 years agoupdate ui tests
Guillaume Gomez [Thu, 12 Sep 2019 13:00:44 +0000 (15:00 +0200)]
update ui tests

4 years agoAdd long error explanation for E0495
Guillaume Gomez [Thu, 12 Sep 2019 12:32:50 +0000 (14:32 +0200)]
Add long error explanation for E0495

4 years agoadd `debug!` to evaluate_obligation
Niko Matsakis [Mon, 7 Oct 2019 15:00:09 +0000 (11:00 -0400)]
add `debug!` to evaluate_obligation

4 years agofix ICE from debug output by using `kind_ty` in dumping closure
Niko Matsakis [Mon, 7 Oct 2019 14:59:46 +0000 (10:59 -0400)]
fix ICE from debug output by using `kind_ty` in dumping closure

Also, make `-Zverbose` dump all info about constants.

4 years agoavoid ICE when extracting closure-kind-ty from a canonicalized value
Niko Matsakis [Mon, 7 Oct 2019 14:59:13 +0000 (10:59 -0400)]
avoid ICE when extracting closure-kind-ty from a canonicalized value

In such a case, the `Infer` is converted to a `Bound`

4 years agocorrect bug in the "has escaping regions" visitor
Niko Matsakis [Mon, 7 Oct 2019 14:58:14 +0000 (10:58 -0400)]
correct bug in the "has escaping regions" visitor

Existing code could overlook types/substitutions that are
embedded in (e.g.) an unevaluated constant.

4 years agomake type-flags exhaustive
Niko Matsakis [Mon, 7 Oct 2019 14:57:44 +0000 (10:57 -0400)]
make type-flags exhaustive

Didn't find any bugs here, but you really don't want these to fall out
of sync.

4 years agoAuto merge of #64780 - choller:master, r=michaelwoerister
bors [Mon, 7 Oct 2019 13:23:00 +0000 (13:23 +0000)]
Auto merge of #64780 - choller:master, r=michaelwoerister

Only add sanitizer runtimes when linking an executable (#64629).

This change modifies the code to only add sanitizer runtimes if we are linking an executable, as those runtimes should never be part of libraries. I successfully compiled `mozilla-central` with ASan using this patch.

4 years agoAuto merge of #65178 - Centril:rollup-ep1zztj, r=Centril
bors [Mon, 7 Oct 2019 09:21:30 +0000 (09:21 +0000)]
Auto merge of #65178 - Centril:rollup-ep1zztj, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #63948 (Add feature gate for raw_dylib.)
 - #65137 (remove event that causes panics in measureme tools)
 - #65164 (Add long error explanation for E0566)
 - #65173 (Update reference)

Failed merges:

r? @ghost

4 years agoUpdate ui tests
Guillaume Gomez [Fri, 4 Oct 2019 11:58:56 +0000 (13:58 +0200)]
Update ui tests

4 years agoAdd long error explanation for E0561
Guillaume Gomez [Fri, 4 Oct 2019 11:58:46 +0000 (13:58 +0200)]
Add long error explanation for E0561

4 years agoRollup merge of #65173 - tmandry:reffy-ref, r=tmandry
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:49 +0000 (10:36 +0200)]
Rollup merge of #65173 - tmandry:reffy-ref, r=tmandry

Update reference

- Add macros in extern blocks and new proc-macro support.
- Update for "modern" `meta` matcher.
- Update await desugaring after rust-lang/rust#64292

4 years agoRollup merge of #65164 - GuillaumeGomez:long-err-explanation-E0566, r=estebank
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:48 +0000 (10:36 +0200)]
Rollup merge of #65164 - GuillaumeGomez:long-err-explanation-E0566, r=estebank

Add long error explanation for E0566

Part of #61137.

4 years agoRollup merge of #65137 - andjo403:selfProfiling_fix, r=michaelwoerister
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:46 +0000 (10:36 +0200)]
Rollup merge of #65137 - andjo403:selfProfiling_fix, r=michaelwoerister

remove event that causes panics in measureme tools

the measureme tools summarize and crox do not alow a event to go out of scope of the parent event

codegen_and_optimize_crate ends after the codegen_crate event

r? @wesleywiser
cc @michaelwoerister @Mark-Simulacrum

4 years agoRollup merge of #63948 - crlf0710:path_to_raw_dylib, r=Centril
Mazdak Farrokhzad [Mon, 7 Oct 2019 08:36:45 +0000 (10:36 +0200)]
Rollup merge of #63948 - crlf0710:path_to_raw_dylib, r=Centril

Add feature gate for raw_dylib.

This PR adds the feature gate for RFC 2627 (https://github.com/rust-lang/rust/issues/58713). It doesn't contain the actual functionality.
Add I'm not sure whether i did it correctly, since this is the first time i did this.

r? @Centril

4 years agoTest diagnostic output of type mismatches for types that have const
ben [Mon, 7 Oct 2019 07:39:08 +0000 (20:39 +1300)]
Test diagnostic output of type mismatches for types that have const
generics arguments.

4 years agoFix compilation error after rebase.
Charles Lew [Sun, 6 Oct 2019 22:52:35 +0000 (06:52 +0800)]
Fix compilation error after rebase.

4 years agoAuto merge of #64739 - guanqun:remove-as-str, r=estebank
bors [Mon, 7 Oct 2019 05:35:17 +0000 (05:35 +0000)]
Auto merge of #64739 - guanqun:remove-as-str, r=estebank

Remove as_str if the type is already &str

Fix https://github.com/rust-lang/rust/issues/62642

r? @estebank

do you think the suggestion tip is good enough?

4 years agosyntax: refactor with new `fn parse_use_tree_glob_or_nested`.
Mazdak Farrokhzad [Mon, 7 Oct 2019 04:31:02 +0000 (06:31 +0200)]
syntax: refactor with new `fn parse_use_tree_glob_or_nested`.

4 years agosyntax: use `parse_extern_abi` more.
Mazdak Farrokhzad [Mon, 7 Oct 2019 04:18:47 +0000 (06:18 +0200)]
syntax: use `parse_extern_abi` more.

4 years agoAdd more tests, fix span issue, improve diagnostics.
Charles Lew [Thu, 19 Sep 2019 17:48:30 +0000 (01:48 +0800)]
Add more tests, fix span issue, improve diagnostics.

4 years agoAddress review comments.
Charles Lew [Wed, 18 Sep 2019 14:40:08 +0000 (22:40 +0800)]
Address review comments.

4 years agoAdd support for parsing #[link_ordinal] attribute.
Charles Lew [Wed, 28 Aug 2019 17:54:25 +0000 (01:54 +0800)]
Add support for parsing #[link_ordinal] attribute.

4 years agoAdd feature gate for raw_dylib.
Charles Lew [Tue, 27 Aug 2019 14:42:44 +0000 (22:42 +0800)]
Add feature gate for raw_dylib.

4 years agosyntax: unify and simplify fn signature parsing.
Mazdak Farrokhzad [Thu, 3 Oct 2019 01:39:46 +0000 (03:39 +0200)]
syntax: unify and simplify fn signature parsing.

4 years agosyntax: unify trait parsing a bit.
Mazdak Farrokhzad [Tue, 1 Oct 2019 12:19:08 +0000 (14:19 +0200)]
syntax: unify trait parsing a bit.

4 years agosyntax: further item parsing cleanup
Mazdak Farrokhzad [Tue, 1 Oct 2019 11:48:54 +0000 (13:48 +0200)]
syntax: further item parsing cleanup

4 years agosyntax: de-dups in item parsing.
Mazdak Farrokhzad [Tue, 1 Oct 2019 10:40:56 +0000 (12:40 +0200)]
syntax: de-dups in item parsing.

4 years agosyntax: cleanup associated const parsing.
Mazdak Farrokhzad [Tue, 1 Oct 2019 10:11:38 +0000 (12:11 +0200)]
syntax: cleanup associated const parsing.

4 years agoRemove `force_ex!`.
Nicholas Nethercote [Mon, 7 Oct 2019 00:59:28 +0000 (11:59 +1100)]
Remove `force_ex!`.

4 years agoAuto merge of #64906 - Aaron1011:feature/extern-const-fn, r=Centril
bors [Mon, 7 Oct 2019 00:12:12 +0000 (00:12 +0000)]
Auto merge of #64906 - Aaron1011:feature/extern-const-fn, r=Centril

Add support for `const unsafe? extern fn`

This works just as you might expect - an `const extern fn` is a `const fn` that is callable from foreign code.

Currently, panicking is not allowed in `const`s. When https://github.com/rust-lang/rfcs/pull/2345 (https://github.com/rust-lang/rust/issues/51999) is stabilized, then panicking in an `const extern fn` will produce a compile-time error when invoked at compile time, and an abort when invoked at runtime.

Since this is extending the language (we're allowing the `const` keyword in a new context), I believe that this will need an FCP. However, it's a very minor change, so I didn't think that filing an RFC was necessary.

This will allow libc (and other FFI crates) to make many functions `const`, without having to give up on making them `extern` as well.

Tracking issue: https://github.com/rust-lang/rust/issues/64926.

4 years agoRemove `def_id!`.
Nicholas Nethercote [Wed, 2 Oct 2019 04:39:36 +0000 (14:39 +1000)]
Remove `def_id!`.

4 years agoRemove `krate!`.
Nicholas Nethercote [Wed, 2 Oct 2019 04:33:30 +0000 (14:33 +1000)]
Remove `krate!`.

4 years agoRemove `force!`.
Nicholas Nethercote [Wed, 2 Oct 2019 04:32:26 +0000 (14:32 +1000)]
Remove `force!`.

4 years agoUpdate reference
Tyler Mandry [Sun, 6 Oct 2019 21:40:08 +0000 (14:40 -0700)]
Update reference

771c5d10cf944bf7d221f5d6cb7abd2a06c400e4 Add macros in extern blocks and new proc-macro support.
8caabd62ef5fbe99e6be6aa9e76f55bbb8433d95 Update for "modern" `meta` matcher.
1b44947d36ccf7eba2b3bd245769eff68abf6d4d Update await desugaring after rust-lang/rust#64292

4 years agoAuto merge of #65169 - tmandry:rollup-qxjj8xp, r=tmandry
bors [Sun, 6 Oct 2019 20:24:37 +0000 (20:24 +0000)]
Auto merge of #65169 - tmandry:rollup-qxjj8xp, r=tmandry

Rollup of 5 pull requests

Successful merges:

 - #65095 (Sort error codes in librustc_passes)
 - #65101 (Upgrade librustc_macros dependencies)
 - #65142 (Ensure that associated `async fn`s have unique fresh param names)
 - #65155 (Use shorthand initialization in rustdoc)
 - #65158 (Remove dead module)

Failed merges:

r? @ghost

4 years agorewrite documentation for unimplemented!
Andrew Banchich [Tue, 24 Sep 2019 03:20:55 +0000 (23:20 -0400)]
rewrite documentation for unimplemented!

4 years agoUpdate ui tests
Guillaume Gomez [Sun, 6 Oct 2019 15:02:01 +0000 (17:02 +0200)]
Update ui tests

4 years agoRollup merge of #65158 - ishitatsuyuki:remove-dead, r=Mark-Simulacrum
Tyler Mandry [Sun, 6 Oct 2019 18:42:00 +0000 (11:42 -0700)]
Rollup merge of #65158 - ishitatsuyuki:remove-dead, r=Mark-Simulacrum

Remove dead module

This module is not referenced any more. (A quick audit didn't show other stale files like this, so presumably this is the only one.)

4 years agoRollup merge of #65155 - Avi-D-coder:fix-lints, r=Mark-Simulacrum
Tyler Mandry [Sun, 6 Oct 2019 18:41:59 +0000 (11:41 -0700)]
Rollup merge of #65155 - Avi-D-coder:fix-lints, r=Mark-Simulacrum

Use shorthand initialization in rustdoc

This just fixes a few lints I rust-analyzer was showing. Is this sort of PR useful? Should the lints be fixed as apart of the otherwise unrelated PR I was working on?

4 years agoRollup merge of #65142 - matthewjasper:unshadow-anon-lifetimes, r=petrochenkov
Tyler Mandry [Sun, 6 Oct 2019 18:41:57 +0000 (11:41 -0700)]
Rollup merge of #65142 - matthewjasper:unshadow-anon-lifetimes, r=petrochenkov

Ensure that associated `async fn`s have unique fresh param names

Closes #64630

4 years agoRollup merge of #65101 - mati865:rustc_macro-deps, r=nikomatsakis
Tyler Mandry [Sun, 6 Oct 2019 18:41:56 +0000 (11:41 -0700)]
Rollup merge of #65101 - mati865:rustc_macro-deps, r=nikomatsakis

Upgrade librustc_macros dependencies

Passed tests on Linux.

4 years agoRollup merge of #65095 - GuillaumeGomez:sort-librustc_passes-err-codes, r=varkor
Tyler Mandry [Sun, 6 Oct 2019 18:41:54 +0000 (11:41 -0700)]
Rollup merge of #65095 - GuillaumeGomez:sort-librustc_passes-err-codes, r=varkor

Sort error codes in librustc_passes

This is just a little cleanup.

4 years agoAuto merge of #64564 - jonas-schievink:cowardly-default, r=nikomatsakis
bors [Sun, 6 Oct 2019 16:32:46 +0000 (16:32 +0000)]
Auto merge of #64564 - jonas-schievink:cowardly-default, r=nikomatsakis

Deny specializing items not in the parent impl

Part of https://github.com/rust-lang/rust/issues/29661 (https://github.com/rust-lang/rfcs/pull/2532). At least sort of?

This was discussed in https://github.com/rust-lang/rust/pull/61812#discussion_r300504114 and is needed for that PR to make progress (fixing an unsoundness).

One annoyance with doing this is that it sometimes requires users to copy-paste a provided trait method into an impl just to mark it `default` (ie. there is no syntax to forward this impl method to the provided trait method).

cc @Centril and @arielb1

4 years agoAdd long error explanation for E0566
Guillaume Gomez [Sun, 6 Oct 2019 13:23:33 +0000 (15:23 +0200)]
Add long error explanation for E0566

4 years agoAuto merge of #65089 - nnethercote:optimize-integral-pattern-matching, r=Mark-Simulacrum
bors [Sun, 6 Oct 2019 12:50:47 +0000 (12:50 +0000)]
Auto merge of #65089 - nnethercote:optimize-integral-pattern-matching, r=Mark-Simulacrum

Optimize integral pattern matching

Various improvements to integral pattern matching. Together they reduce instruction counts for `unicode_normalization-check-clean` by about 16%.

r? @Mark-Simulacrum

4 years agoRemove loaded_from_cache map from DepGraph
Mark Rousskov [Sun, 6 Oct 2019 12:38:23 +0000 (08:38 -0400)]
Remove loaded_from_cache map from DepGraph

It's now unused, even with -Zquery-dep-graph

4 years agosort error codes in librustc_passes
Guillaume Gomez [Sun, 6 Oct 2019 12:18:41 +0000 (14:18 +0200)]
sort error codes in librustc_passes

4 years agoSuggest dereferencing boolean reference when used in 'if' or 'while'
wangxiangqing [Sun, 6 Oct 2019 04:03:53 +0000 (12:03 +0800)]
Suggest dereferencing boolean reference when used in 'if' or 'while'

Change-Id: I0c5c4d767be2647e6f017ae7bf83558c56dbca97

4 years agoSuggest dereferencing boolean reference when used in 'if' or 'while'
wangxiangqing [Sun, 6 Oct 2019 04:03:53 +0000 (12:03 +0800)]
Suggest dereferencing boolean reference when used in 'if' or 'while'

Change-Id: I0c5c4d767be2647e6f017ae7bf83558c56dbca97

4 years agoAuto merge of #65043 - Aaron1011:fix/reexport-determinism, r=petrochenkov
bors [Sun, 6 Oct 2019 08:40:43 +0000 (08:40 +0000)]
Auto merge of #65043 - Aaron1011:fix/reexport-determinism, r=petrochenkov

Make re-export collection deterministic

Fixes https://github.com/rust-lang/rust/issues/65036

Previously, we were using an `FxHashMap` to collect module re-exports.
However, re-exports end up getting serialized into crate metadata, which
means that metadata generation was non-deterministic. This resulted in
spurious error messages changes (e.g. PR #64906) due to pretty-printing
implicitly depending on the order of re-exports when computing the
proper path to show to the user.

See #65042 for a long-term strategy to detect this kind of issue

4 years agoUse shorthand initialization in rustdoc
Avi Dessauer [Sun, 6 Oct 2019 07:42:53 +0000 (03:42 -0400)]
Use shorthand initialization in rustdoc

4 years agoFix const arguments not displaying in types mismatch diagnostic.
ben [Sun, 6 Oct 2019 06:56:05 +0000 (19:56 +1300)]
Fix const arguments not displaying in types mismatch diagnostic.

4 years agoAuto merge of #65152 - tmandry:rollup-btn4a01, r=tmandry
bors [Sun, 6 Oct 2019 04:59:16 +0000 (04:59 +0000)]
Auto merge of #65152 - tmandry:rollup-btn4a01, r=tmandry

Rollup of 18 pull requests

This contains changes from all the successful runs that bors marked as timed out, plus a revert of #63649 which appears to be the immediate cause of the timeouts.

Successful merges:

 - #64708 (Stabilize `Option::as_deref` and `Option::as_deref_mut`)
 - #64728 (Stabilize UdpSocket::peer_addr)
 - #64765 (std: Reduce checks for `feature = "backtrace"`)
 - #64909 (When encountering chained operators use heuristics to recover from bad turbofish)
 - #65011 (Do not ICE when dereferencing non-Copy raw pointer)
 - #65064 (permit asyncawait-ondeck to be added by anyone)
 - #65066 ([const-prop] Fix ICE when trying to eval polymorphic promoted MIR)
 - #65100 (Replace GeneratorSubsts with SubstsRef)
 - #65105 (Split out some passes from librustc)
 - #65106 (Allow unused attributes to avoid incremental bug)
 - #65113 (Fix lonely backtick)
 - #65116 (Remove unneeded visit_statement definition)
 - #65118 (Update the documented default of -Z mutable-noalias)
 - #65123 (Account for macro invocation in `let mut $pat` diagnostic.)
 - #65124 (Replace some instances of `as *[const | mut] _` with `.cast()`)
 - #65126 (Fix typo on `now()` comments)
 - #65130 (lint: extern non-exhaustive types are improper)
 - #65151 (Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend")

Failed merges:

r? @ghost

4 years agoRollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandry
Tyler Mandry [Sun, 6 Oct 2019 04:55:13 +0000 (21:55 -0700)]
Rollup merge of #65151 - tmandry:revert-emscripten-upgrade, r=tmandry

Revert #63649 - "Upgrade Emscripten targets to use upstream LLVM backend"

This change caused the runtime of the linux-asmjs builder to nearly double from 2+ hours to about 4 hours, which happens to be the bors timeout. (It made it in barely under 4 hours when it was merged.) This is causing timeouts on all new changes.

This reverts commit 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91, reversing
changes made to 2e7244807a7878f6eca3eb7d97ae9b413aa49014.

4 years agoRollup merge of #65130 - davidtwco:rfc-2008-improper-ctypes, r=petrochenkov
Tyler Mandry [Sun, 6 Oct 2019 04:55:11 +0000 (21:55 -0700)]
Rollup merge of #65130 - davidtwco:rfc-2008-improper-ctypes, r=petrochenkov

lint: extern non-exhaustive types are improper

This PR makes the `improper_ctype` lint trigger for non-exhaustive types when those types aren't defined in the current crate, as per [this comment](https://github.com/rust-lang/rust/issues/44109#issuecomment-537583344).

cc @Centril

4 years agoRollup merge of #65126 - BO41:time_typo, r=kennytm
Tyler Mandry [Sun, 6 Oct 2019 04:55:10 +0000 (21:55 -0700)]
Rollup merge of #65126 - BO41:time_typo, r=kennytm

Fix typo on `now()` comments

Fix typo, update words, and remove some redundant word.
Also rustfmt on the rest of the file (hope this is okay :)

revival of #61433

r? @kennytm

4 years agoRollup merge of #65124 - memoryruins:castaway, r=petrochenkov
Tyler Mandry [Sun, 6 Oct 2019 04:55:08 +0000 (21:55 -0700)]
Rollup merge of #65124 - memoryruins:castaway, r=petrochenkov

Replace some instances of `as *[const | mut] _` with `.cast()`

While in `codegen_llvm`, noticed some places for the recent `pointer::cast` method.

4 years agoRollup merge of #65123 - Centril:mac-invoc-in-mut-pat, r=estebank
Tyler Mandry [Sun, 6 Oct 2019 04:55:07 +0000 (21:55 -0700)]
Rollup merge of #65123 - Centril:mac-invoc-in-mut-pat, r=estebank

Account for macro invocation in `let mut $pat` diagnostic.

Fixes https://github.com/rust-lang/rust/issues/65122.

r? @estebank

4 years agoRollup merge of #65118 - cuviper:Zmutable-noalias-default, r=rkruppe
Tyler Mandry [Sun, 6 Oct 2019 04:55:06 +0000 (21:55 -0700)]
Rollup merge of #65118 - cuviper:Zmutable-noalias-default, r=rkruppe

Update the documented default of -Z mutable-noalias

It has been fully disabled by default since #54639.

4 years agoRollup merge of #65116 - spastorino:remove-unneeded-fn, r=oli-obk
Tyler Mandry [Sun, 6 Oct 2019 04:55:04 +0000 (21:55 -0700)]
Rollup merge of #65116 - spastorino:remove-unneeded-fn, r=oli-obk

Remove unneeded visit_statement definition

r? @oli-obk

4 years agoRollup merge of #65113 - Qwaz:master, r=jonas-schievink
Tyler Mandry [Sun, 6 Oct 2019 04:55:03 +0000 (21:55 -0700)]
Rollup merge of #65113 - Qwaz:master, r=jonas-schievink

Fix lonely backtick

That backtick won't be sad anymore

4 years agoRollup merge of #65106 - Mark-Simulacrum:unused-attr-allow, r=Centril
Tyler Mandry [Sun, 6 Oct 2019 04:55:01 +0000 (21:55 -0700)]
Rollup merge of #65106 - Mark-Simulacrum:unused-attr-allow, r=Centril

Allow unused attributes to avoid incremental bug

cc #65023

This isn't labeled as fixing that issue because it's not really a fix, just a patch.

4 years agoRollup merge of #65105 - Mark-Simulacrum:split-librustc, r=nikomatsakis
Tyler Mandry [Sun, 6 Oct 2019 04:55:00 +0000 (21:55 -0700)]
Rollup merge of #65105 - Mark-Simulacrum:split-librustc, r=nikomatsakis

Split out some passes from librustc

This is just moving them out to librustc_passes -- I've not measured compile time or run time. I don't expect any significant impact, but this seems prudent regardless.

4 years agoRollup merge of #65100 - csmoe:generator, r=nikomatsakis
Tyler Mandry [Sun, 6 Oct 2019 04:54:59 +0000 (21:54 -0700)]
Rollup merge of #65100 - csmoe:generator, r=nikomatsakis

Replace GeneratorSubsts with SubstsRef

Closes #42340
r? @nikomatsakis

4 years agoRollup merge of #65066 - wesleywiser:fix_const_prop_ice_on_polymorphic_promoted_mir...
Tyler Mandry [Sun, 6 Oct 2019 04:54:57 +0000 (21:54 -0700)]
Rollup merge of #65066 - wesleywiser:fix_const_prop_ice_on_polymorphic_promoted_mir, r=oli-obk

[const-prop] Fix ICE when trying to eval polymorphic promoted MIR

Fixes #64908

r? @oli-obk
cc @nikomatsakis @pnkfelix