]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMake inlining carry over unevaluated consts
Santiago Pastorino [Sun, 5 Apr 2020 17:09:45 +0000 (14:09 -0300)]
Make inlining carry over unevaluated consts

4 years agoEvaluate unevaluated MIR constants in codegen_mir
Santiago Pastorino [Sun, 5 Apr 2020 13:30:32 +0000 (10:30 -0300)]
Evaluate unevaluated MIR constants in codegen_mir

4 years agoAdd MirPass to collect Unevaluated consts in MIR body
Santiago Pastorino [Fri, 3 Apr 2020 21:26:24 +0000 (18:26 -0300)]
Add MirPass to collect Unevaluated consts in MIR body

4 years agoMake mir::Constant Copy
Santiago Pastorino [Sun, 5 Apr 2020 14:08:39 +0000 (11:08 -0300)]
Make mir::Constant Copy

4 years agoAuto merge of #71467 - Dylan-DPC:rollup-d1os8ug, r=Dylan-DPC
bors [Thu, 23 Apr 2020 14:40:20 +0000 (14:40 +0000)]
Auto merge of #71467 - Dylan-DPC:rollup-d1os8ug, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #71005 (Reading from the return place is fine)
 - #71198 (Const check/promotion cleanup and sanity assertion)
 - #71396 (Improve E0308 error message wording again)
 - #71452 (Remove outdated reference to interpreter snapshotting)
 - #71454 (Inline some function docs in `core::ptr`)
 - #71461 (Improve E0567 explanation)

Failed merges:

r? @ghost

4 years agoRollup merge of #71461 - GuillaumeGomez:improve-e0567, r=Dylan-DPC
Dylan DPC [Thu, 23 Apr 2020 13:57:19 +0000 (15:57 +0200)]
Rollup merge of #71461 - GuillaumeGomez:improve-e0567, r=Dylan-DPC

Improve E0567 explanation

r? @Dylan-DPC

4 years agoRollup merge of #71454 - ecstatic-morse:inline-core-ptr-docs, r=RalfJung
Dylan DPC [Thu, 23 Apr 2020 13:57:18 +0000 (15:57 +0200)]
Rollup merge of #71454 - ecstatic-morse:inline-core-ptr-docs, r=RalfJung

Inline some function docs in `core::ptr`

Resolves #64539.

4 years agoRollup merge of #71452 - ecstatic-morse:no-more-snapshot, r=RalfJung
Dylan DPC [Thu, 23 Apr 2020 13:57:16 +0000 (15:57 +0200)]
Rollup merge of #71452 - ecstatic-morse:no-more-snapshot, r=RalfJung

Remove outdated reference to interpreter snapshotting

This should have been a part of #70087.

r? @RalfJung

4 years agoRollup merge of #71396 - DeeDeeG:improve-e0308-again, r=estebank
Dylan DPC [Thu, 23 Apr 2020 13:57:14 +0000 (15:57 +0200)]
Rollup merge of #71396 - DeeDeeG:improve-e0308-again, r=estebank

Improve E0308 error message wording again

Hello again,

I recently did this PR: #70242

I felt the error message could be further improved, so I made [a post on the Rust community forum](https://users.rust-lang.org/t/looking-for-feedback-on-an-improved-error-message-for-e0308/40004) to ask for feedback.

(Also, there were some comments on my original PR that I took into consideration as well.)

This PR is my attempt to take all the feedback into account and propose a better and simplified error message that should still be accurate. Its main benefit is having simpler grammar, and hopefully being easier to read and understand.

Thanks to everyone who commented and gave feedback, and thank you for taking a look at this PR.

4 years agoRollup merge of #71198 - oli-obk:const_check_cleanup, r=RalfJung
Dylan DPC [Thu, 23 Apr 2020 13:57:13 +0000 (15:57 +0200)]
Rollup merge of #71198 - oli-obk:const_check_cleanup, r=RalfJung

Const check/promotion cleanup and sanity assertion

r? @RalfJung

This is just the part of https://github.com/rust-lang/rust/pull/70042#issuecomment-614592765 that does not change behaviour

4 years agoRollup merge of #71005 - jonas-schievink:no-place-like-return, r=oli-obk
Dylan DPC [Thu, 23 Apr 2020 13:57:11 +0000 (15:57 +0200)]
Rollup merge of #71005 - jonas-schievink:no-place-like-return, r=oli-obk

Reading from the return place is fine

Const eval thinks that reading from local `_0` is UB, but it isn't. `_0` is just a normal local like any other, and codegen handles it that way too. The only special thing is that the `Return` terminator will read from it.

I've hit these errors while working on an NRVO pass that can merge other locals with `_0` in https://github.com/rust-lang/rust/pull/71003.

r? @oli-obk

4 years agoDocument our sanity assertion around explicit promotion
Oliver Scherer [Thu, 16 Apr 2020 13:06:17 +0000 (15:06 +0200)]
Document our sanity assertion around explicit promotion

4 years agoCatch and fix explicit promotions that fail to actually promote
Oliver Scherer [Mon, 6 Apr 2020 16:37:26 +0000 (18:37 +0200)]
Catch and fix explicit promotions that fail to actually promote

4 years agoUse `ConstCx` for `validate_candidates`
Oliver Scherer [Thu, 2 Apr 2020 14:38:50 +0000 (16:38 +0200)]
Use `ConstCx` for `validate_candidates`

4 years agoImprove E0567 explanation
Guillaume Gomez [Thu, 23 Apr 2020 11:17:00 +0000 (13:17 +0200)]
Improve E0567 explanation

4 years agoUse ConstCx in the promoted collector
Oliver Scherer [Thu, 2 Apr 2020 14:32:01 +0000 (16:32 +0200)]
Use ConstCx in the promoted collector

4 years agoUse ConstCx in more places
Oliver Scherer [Thu, 2 Apr 2020 14:14:11 +0000 (16:14 +0200)]
Use ConstCx in more places

4 years agoRename `Item` to `ConstCx`.
Oliver Scherer [Mon, 23 Mar 2020 13:02:58 +0000 (14:02 +0100)]
Rename `Item` to `ConstCx`.

This renaming was already done in some modules via import renaming. It's strictly used as a context, and it contains a `TyCtxt`.

4 years agoFix ui test blessing when a test has an empty stderr file after having had content...
Oliver Scherer [Mon, 16 Mar 2020 13:53:22 +0000 (14:53 +0100)]
Fix ui test blessing when a test has an empty stderr file after having had content there before the current changes

4 years agoAuto merge of #71343 - RalfJung:miri, r=RalfJung
bors [Thu, 23 Apr 2020 06:53:19 +0000 (06:53 +0000)]
Auto merge of #71343 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/71241
r? @ghost Cc @rust-lang/miri

4 years agoAuto merge of #71312 - wesleywiser:const_prop_bitset, r=Mark-Simulacrum
bors [Thu, 23 Apr 2020 03:44:28 +0000 (03:44 +0000)]
Auto merge of #71312 - wesleywiser:const_prop_bitset, r=Mark-Simulacrum

[ConstProp] Use a `BitSet<Local>` instead of `IndexVec<Local, bool>`

4 years agoInline some function docs re-exported in `std::ptr`
Dylan MacKenzie [Thu, 23 Apr 2020 00:59:30 +0000 (17:59 -0700)]
Inline some function docs re-exported in `std::ptr`

4 years agoAuto merge of #71445 - Dylan-DPC:rollup-31givp1, r=Dylan-DPC
bors [Thu, 23 Apr 2020 00:28:05 +0000 (00:28 +0000)]
Auto merge of #71445 - Dylan-DPC:rollup-31givp1, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #71256 (Lint must_use on mem::replace)
 - #71350 (Error code explanation extra check)
 - #71369 (allow wasm32 compilation of librustc_data_structures/profiling.rs)
 - #71400 (proc_macro::is_available())
 - #71440 (Implement `Copy` for `AllocErr`)

Failed merges:

r? @ghost

4 years agoRemove outdated reference to interpreter snapshotting
Dylan MacKenzie [Wed, 22 Apr 2020 23:31:14 +0000 (16:31 -0700)]
Remove outdated reference to interpreter snapshotting

4 years agoupdate Miri
Ralf Jung [Wed, 22 Apr 2020 22:12:04 +0000 (00:12 +0200)]
update Miri

4 years agoRollup merge of #71440 - TimDiekmann:copy-allocerr, r=Amanieu
Dylan DPC [Wed, 22 Apr 2020 21:19:25 +0000 (23:19 +0200)]
Rollup merge of #71440 - TimDiekmann:copy-allocerr, r=Amanieu

Implement `Copy` for `AllocErr`

r? @Amanieu

4 years agoRollup merge of #71400 - dtolnay:isavailable, r=petrochenkov
Dylan DPC [Wed, 22 Apr 2020 21:19:24 +0000 (23:19 +0200)]
Rollup merge of #71400 - dtolnay:isavailable, r=petrochenkov

proc_macro::is_available()

This PR adds `proc_macro::is_available() -> bool` to determine whether proc_macro has been made accessible to the currently running program.

The proc_macro crate is only intended for use inside the implementation of procedural macros. All the functions in the crate panic if invoked from outside of a procedural macro, such as from a build script or unit test or ordinary Rust binary.

Unfortunately those panics made it impossible for libraries that are designed to support both macro and non-macro use cases (e.g. Syn) to be used from binaries that are compiled with panic=abort. In panic=unwind mode we're able to attempt a proc macro call inside catch_unwind and use libproc_macro's result if it succeeds, otherwise fall back to a non-macro alternative implementation. But in panic=abort there was no way to determine which implementation needs to be used.

r? @eddyb
attn: @petrochenkov @adetaylor
ref: https://github.com/dtolnay/cxx/issues/130

4 years agoRollup merge of #71369 - ctaggart:wasm32_profiling, r=ecstatic-morse
Dylan DPC [Wed, 22 Apr 2020 21:19:22 +0000 (23:19 +0200)]
Rollup merge of #71369 - ctaggart:wasm32_profiling, r=ecstatic-morse

allow wasm32 compilation of librustc_data_structures/profiling.rs

I'm trying to use rustfmt from a wasm app. I ran into this compilation problem https://github.com/rust-lang/rustfmt/issues/4132 and after investigating, it looked like just adjusting a few cfg's. I based it on how measureme added support in https://github.com/rust-lang/measureme/pull/43.

My testing on my macbook was just that librustc_data_structures builds now with both:
- cargo build
- cargo build --target wasm32-unknown-unknown

4 years agoRollup merge of #71350 - GuillaumeGomez:error-code-explanation-extra-check, r=oli-obk
Dylan DPC [Wed, 22 Apr 2020 21:19:20 +0000 (23:19 +0200)]
Rollup merge of #71350 - GuillaumeGomez:error-code-explanation-extra-check, r=oli-obk

Error code explanation extra check

r? @Mark-Simulacrum

4 years agoRollup merge of #71256 - cuviper:must_use_replace, r=estebank
Dylan DPC [Wed, 22 Apr 2020 21:19:19 +0000 (23:19 +0200)]
Rollup merge of #71256 - cuviper:must_use_replace, r=estebank

Lint must_use on mem::replace

This adds a hint on `mem::replace`, "if you don't need the old value,
you can just assign the new value directly". This is in similar spirit
to the `must_use` on `ManuallyDrop::take`.

4 years agoAuto merge of #71044 - ecstatic-morse:body-predecessor-cache, r=oli-obk
bors [Wed, 22 Apr 2020 21:08:28 +0000 (21:08 +0000)]
Auto merge of #71044 - ecstatic-morse:body-predecessor-cache, r=oli-obk

Remove `BodyAndCache`

...returning to the original approach using interior mutability within `Body`. This simplifies the API at the cost of some uncontended mutex locks when the parallel compiler is enabled.

The current API requires you to either have a mutable reference to `Body` (`&mut BodyAndCache`), or to compute the predecessor graph ahead of time by creating a `ReadOnlyBodyAndCache`. This is not a good fit for, e.g., the dataflow framework, which
1. does not mutate the MIR
2. only sometimes needs the predecessor graph (for backward dataflow problems)

4 years agoMake `AllocErr` copyable
Tim Diekmann [Wed, 22 Apr 2020 20:40:21 +0000 (22:40 +0200)]
Make `AllocErr` copyable

4 years agoAdd tracking issue for proc_macro_is_available
David Tolnay [Wed, 22 Apr 2020 18:07:07 +0000 (11:07 -0700)]
Add tracking issue for proc_macro_is_available

4 years agoAuto merge of #71431 - Dylan-DPC:rollup-rvm6tfy, r=Dylan-DPC
bors [Wed, 22 Apr 2020 17:52:21 +0000 (17:52 +0000)]
Auto merge of #71431 - Dylan-DPC:rollup-rvm6tfy, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #71280 (Miri: mplace_access_checked: offer option to force different alignment on place)
 - #71336 (Exhaustively match on `{Statement,Terminator}Kind` during const checking)
 - #71370 (Added detailed error code explanation for issue E0696 in Rust compiler.)
 - #71401 (visit_place_base is just visit_local)

Failed merges:

r? @ghost

4 years agoReplace multiple calls to `predecessors_for`
Dylan MacKenzie [Sun, 19 Apr 2020 20:56:49 +0000 (13:56 -0700)]
Replace multiple calls to `predecessors_for`

...with a single one to `predecessors`. `predecessors_for` requires
taking the lock/incrementing the `RefCell` once each call.

4 years agoAdd `#[inline]` declarations
Dylan MacKenzie [Sun, 12 Apr 2020 17:48:56 +0000 (10:48 -0700)]
Add `#[inline]` declarations

4 years agoUse `Body` everywhere
Dylan MacKenzie [Sun, 12 Apr 2020 17:31:00 +0000 (10:31 -0700)]
Use `Body` everywhere

4 years agoDon't use `*` for deref-coercion
Dylan MacKenzie [Sun, 12 Apr 2020 17:28:41 +0000 (10:28 -0700)]
Don't use `*` for deref-coercion

4 years agoUse internal mutability for predecessor cache
Dylan MacKenzie [Sun, 12 Apr 2020 17:30:07 +0000 (10:30 -0700)]
Use internal mutability for predecessor cache

4 years agoremove some extra }
Cameron Taggart [Wed, 22 Apr 2020 15:18:54 +0000 (09:18 -0600)]
remove some extra }

4 years agosuggested rearrangement of the cfg if statements
Cameron Taggart [Wed, 22 Apr 2020 15:12:44 +0000 (09:12 -0600)]
suggested rearrangement of the cfg if statements

Co-Authored-By: ecstatic-morse <ecstaticmorse@gmail.com>
4 years agoRollup merge of #71401 - spastorino:remove-visit-place-base, r=wesleywiser
Dylan DPC [Wed, 22 Apr 2020 14:41:14 +0000 (16:41 +0200)]
Rollup merge of #71401 - spastorino:remove-visit-place-base, r=wesleywiser

visit_place_base is just visit_local

r? @wesleywiser

4 years agoRollup merge of #71370 - PankajChaudhary5:ErrorCode-E0696, r=GuillaumeGomez
Dylan DPC [Wed, 22 Apr 2020 14:41:12 +0000 (16:41 +0200)]
Rollup merge of #71370 - PankajChaudhary5:ErrorCode-E0696, r=GuillaumeGomez

Added detailed error code explanation for issue E0696 in Rust compiler.

Added proper error explanation for issue E0696 in the Rust compiler.
Error Code E0696

Sub Part of Issue #61137

r? @GuillaumeGomez

4 years agoRollup merge of #71336 - ecstatic-morse:check-consts-asm, r=oli-obk
Dylan DPC [Wed, 22 Apr 2020 14:41:11 +0000 (16:41 +0200)]
Rollup merge of #71336 - ecstatic-morse:check-consts-asm, r=oli-obk

Exhaustively match on `{Statement,Terminator}Kind` during const checking

This adds a pre-monomorphization error for inline assembly in a const context as well.

r? @oli-obk

4 years agoRollup merge of #71280 - RalfJung:mplace-check-align, r=oli-obk
Dylan DPC [Wed, 22 Apr 2020 14:41:09 +0000 (16:41 +0200)]
Rollup merge of #71280 - RalfJung:mplace-check-align, r=oli-obk

Miri: mplace_access_checked: offer option to force different alignment on place

Required to solve https://github.com/rust-lang/miri/issues/1339 in https://github.com/rust-lang/miri/pull/1348.

r? @oli-obk

4 years agoAuto merge of #71374 - nnethercote:alphabetize-C-and-Z-options, r=petrochenkov
bors [Wed, 22 Apr 2020 14:39:33 +0000 (14:39 +0000)]
Auto merge of #71374 - nnethercote:alphabetize-C-and-Z-options, r=petrochenkov

Alphabetize `-C` and `-Z` options

Because it will make it much easier to find options that way.

r? @petrochenkov

4 years agoFix new tidy checks
Guillaume Gomez [Mon, 20 Apr 2020 12:35:25 +0000 (14:35 +0200)]
Fix new tidy checks

4 years agoAdd checks to ensure that explanations have code examples using the error code and...
Guillaume Gomez [Mon, 20 Apr 2020 12:35:15 +0000 (14:35 +0200)]
Add checks to ensure that explanations have code examples using the error code and also that 'compile_fail' isn't mispelled

4 years agoUse macros for option tests.
Nicholas Nethercote [Tue, 21 Apr 2020 05:55:02 +0000 (15:55 +1000)]
Use macros for option tests.

4 years agoAdd all the missing option tests.
Nicholas Nethercote [Tue, 21 Apr 2020 03:25:07 +0000 (13:25 +1000)]
Add all the missing option tests.

4 years agoAlphabetize the `-C` and `-Z` options.
Nicholas Nethercote [Tue, 21 Apr 2020 00:06:13 +0000 (10:06 +1000)]
Alphabetize the `-C` and `-Z` options.

In the code, test, and docs, because it makes it much easier to find
things.

Other than adding the comments about alphabetical order, this commit
only moves things around.

4 years agoAuto merge of #71424 - Dylan-DPC:rollup-iunh61a, r=Dylan-DPC
bors [Wed, 22 Apr 2020 11:14:23 +0000 (11:14 +0000)]
Auto merge of #71424 - Dylan-DPC:rollup-iunh61a, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #70970 (Detect mistyped associated consts in `Instance::resolve`.)
 - #71203 (Correct await span for async-await error reporting)
 - #71214 (Add error code for inner doc error)
 - #71337 (Moving all rustdoc-ui tests to check-pass)
 - #71412 (Clarify unused_doc_comments note on macro invocations)
 - #71414 (More diagnostic items for Clippy usage)

Failed merges:

r? @ghost

4 years agocomment explaining force_align usage
Ralf Jung [Wed, 22 Apr 2020 10:58:17 +0000 (12:58 +0200)]
comment explaining force_align usage

4 years agoRollup merge of #71414 - phansch:more-diagnostic-items, r=Manishearth
Dylan DPC [Wed, 22 Apr 2020 10:18:39 +0000 (12:18 +0200)]
Rollup merge of #71414 - phansch:more-diagnostic-items, r=Manishearth

More diagnostic items for Clippy usage

This adds a couple of more diagnostic items to be used in Clippy.
I chose these particular ones because they were the types which we seem
to check for the most in Clippy. I'm not sure if the `cfg_attr(not(test))`
is needed, but it was also used for `Vec` and a few other types.

cc https://github.com/rust-lang/rust-clippy/issues/5393

r? @Manishearth

4 years agoRollup merge of #71412 - dtolnay:uselessdoc, r=Manishearth
Dylan DPC [Wed, 22 Apr 2020 10:18:38 +0000 (12:18 +0200)]
Rollup merge of #71412 - dtolnay:uselessdoc, r=Manishearth

Clarify unused_doc_comments note on macro invocations

The previous error message used to say:

<pre>
/// doc
^^^^^^^ rustdoc does not generate documentation for <b>macros</b>
</pre>

Obviously we do generate documentation for macros, such as https://docs.rs/bitflags/1.2.1/bitflags/macro.bitflags.html. It's only macro invocations that don't get their own docs. This PR updates the message to say "rustdoc does not generate documentation for <b>macro invocations</b>".

I observe that prior to #69084 this used to say "rustdoc does not generate documentation for **macro expansions**", as implemented originally in #57882. I don't have a preference between those but I made the commit before looking up the history.

r? @Manishearth
attn: @yaahc @euclio

4 years agoRollup merge of #71337 - Valloric:rustdoc-check-pass, r=GuillaumeGomez
Dylan DPC [Wed, 22 Apr 2020 10:18:36 +0000 (12:18 +0200)]
Rollup merge of #71337 - Valloric:rustdoc-check-pass, r=GuillaumeGomez

Moving all rustdoc-ui tests to check-pass

These were all build-pass before and don't seem to need it.

Helps with #62277

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/rust-lang/rust/71337)
<!-- Reviewable:end -->

4 years agoRollup merge of #71214 - GuillaumeGomez:add-error-code-inner-doc-error, r=Dylan-DPC
Dylan DPC [Wed, 22 Apr 2020 10:18:34 +0000 (12:18 +0200)]
Rollup merge of #71214 - GuillaumeGomez:add-error-code-inner-doc-error, r=Dylan-DPC

Add error code for inner doc error

r? @Dylan-DPC

cc @oli-obk

4 years agoRollup merge of #71203 - csmoe:issue-71137, r=csmoe
Dylan DPC [Wed, 22 Apr 2020 10:18:33 +0000 (12:18 +0200)]
Rollup merge of #71203 - csmoe:issue-71137, r=csmoe

Correct await span for async-await error reporting

Closes #71137
r? @tmandry

4 years agoRollup merge of #70970 - eddyb:trait-vs-impl-mismatch, r=oli-obk
Dylan DPC [Wed, 22 Apr 2020 10:18:31 +0000 (12:18 +0200)]
Rollup merge of #70970 - eddyb:trait-vs-impl-mismatch, r=oli-obk

Detect mistyped associated consts in `Instance::resolve`.

*Based on #71049 to prevent redundant/misleading downstream errors.*

Fixes #70942 by refusing to resolve an associated `const` if it doesn't have the same type in the `impl` that it does in the `trait` (which we assume had errored, and `delay_span_bug` guards against bugs).

4 years agoUpdate UI tests
Guillaume Gomez [Wed, 22 Apr 2020 09:09:57 +0000 (11:09 +0200)]
Update UI tests

4 years agoAdd error code to inner doc comment attribute error
Guillaume Gomez [Wed, 22 Apr 2020 09:08:50 +0000 (11:08 +0200)]
Add error code to inner doc comment attribute error

4 years agoAuto merge of #71323 - nnethercote:bitcode-in-rlib, r=alexcrichton
bors [Wed, 22 Apr 2020 07:52:42 +0000 (07:52 +0000)]
Auto merge of #71323 - nnethercote:bitcode-in-rlib, r=alexcrichton

Add `-Cbitcode-in-rlib`.

This is a cut-down version of #70458 that gets the compile-time wins.

r? @alexcrichton

4 years agoMore diagnostic items for Clippy usage
Philipp Hansch [Wed, 22 Apr 2020 05:47:31 +0000 (07:47 +0200)]
More diagnostic items for Clippy usage

This adds a couple of more diagnostic items to be used in Clippy.
I chose these particular ones because they were the types which we seem
to check for the most in Clippy. I'm not sure if the
`cfg_attr(not(test))` is needed, but it was also used for `Vec` and a
few other types.

4 years agoBuild libstd with `-Cbitcode-in-rlib=yes`.
Nicholas Nethercote [Sun, 19 Apr 2020 11:17:38 +0000 (21:17 +1000)]
Build libstd with `-Cbitcode-in-rlib=yes`.

So that the rlibs will work with both LTO and non-LTO builds.

4 years agoAdd a simple test.
Nicholas Nethercote [Mon, 20 Apr 2020 00:03:35 +0000 (10:03 +1000)]
Add a simple test.

4 years agoAdd a new option `-Cbitcode-in-rlib`.
Nicholas Nethercote [Sun, 19 Apr 2020 10:48:43 +0000 (20:48 +1000)]
Add a new option `-Cbitcode-in-rlib`.

It defaults to true, but Cargo will set this to false whenever it can to
reduce compile times.

4 years agoRemove an old in-progress comment from a previous PR.
Nicholas Nethercote [Sun, 19 Apr 2020 10:49:38 +0000 (20:49 +1000)]
Remove an old in-progress comment from a previous PR.

This comment wasn't supposed to have landed.

4 years agoClarify unused_doc_comments note on macro invocations
David Tolnay [Wed, 22 Apr 2020 04:09:24 +0000 (21:09 -0700)]
Clarify unused_doc_comments note on macro invocations

4 years agoAuto merge of #71410 - JohnTitor:rollup-vh6dut5, r=JohnTitor
bors [Wed, 22 Apr 2020 03:50:02 +0000 (03:50 +0000)]
Auto merge of #71410 - JohnTitor:rollup-vh6dut5, r=JohnTitor

Rollup of 7 pull requests

Successful merges:

 - #70998 (Suggest `-> impl Trait` and `-> Box<dyn Trait>` on fn that doesn't return)
 - #71236 (Remove unused rustc_serialize::hex module)
 - #71366 (Use assoc int consts3)
 - #71372 (Fix #! (shebang) stripping account space issue)
 - #71384 (Fix stage0.txt version number comment)
 - #71390 (Fix incorrect description of E0690)
 - #71399 (Clean up E0554 explanation)

Failed merges:

r? @ghost

4 years agoadd test for correct await span
csmoe [Thu, 16 Apr 2020 15:14:11 +0000 (23:14 +0800)]
add test for correct await span

4 years agoRollup merge of #71399 - rust-lang:cleanup-e0554, r=Dylan-DPC
Yuki Okushi [Wed, 22 Apr 2020 01:34:12 +0000 (10:34 +0900)]
Rollup merge of #71399 - rust-lang:cleanup-e0554, r=Dylan-DPC

Clean up E0554 explanation

r? @Dylan-DPC

4 years agoRollup merge of #71390 - aticu:master, r=Dylan-DPC
Yuki Okushi [Wed, 22 Apr 2020 01:34:10 +0000 (10:34 +0900)]
Rollup merge of #71390 - aticu:master, r=Dylan-DPC

Fix incorrect description of E0690

r? @steveklabnik

4 years agoRollup merge of #71384 - RalfJung:RalfJung-patch-1, r=Mark-Simulacrum
Yuki Okushi [Wed, 22 Apr 2020 01:34:09 +0000 (10:34 +0900)]
Rollup merge of #71384 - RalfJung:RalfJung-patch-1, r=Mark-Simulacrum

Fix stage0.txt version number comment

r? @Mark-Simulacrum

4 years agoRollup merge of #71372 - ayushmishra2005:shebang_stripping, r=estebank
Yuki Okushi [Wed, 22 Apr 2020 01:34:07 +0000 (10:34 +0900)]
Rollup merge of #71372 - ayushmishra2005:shebang_stripping, r=estebank

Fix #! (shebang) stripping account space issue

 #70528

4 years agoRollup merge of #71366 - faern:use-assoc-int-consts3, r=dtolnay
Yuki Okushi [Wed, 22 Apr 2020 01:34:06 +0000 (10:34 +0900)]
Rollup merge of #71366 - faern:use-assoc-int-consts3, r=dtolnay

Use assoc int consts3

Define module level int consts with associated constants instead of `min_value()` and `max_value()`. So the code become consistent with what the docs recommend etc. Seems natural.

Also remove the last usages of the int module constants from this repo (except src/test/ directory which I have still not really done anything in). Some places were missed in the previous PRs because the code uses `crate::<IntTy>` to reach the constants.

This is a continuation of #70857

r? @dtolnay

4 years agoRollup merge of #71236 - sinkuu:cleanup, r=nikomatsakis
Yuki Okushi [Wed, 22 Apr 2020 01:34:04 +0000 (10:34 +0900)]
Rollup merge of #71236 - sinkuu:cleanup, r=nikomatsakis

Remove unused rustc_serialize::hex module

* Remove unused `rustc_serialize::hex` module
* Cleanup `Cargo.toml`

4 years agoRollup merge of #70998 - estebank:suggest-impl-trait-empty-fn, r=varkor
Yuki Okushi [Wed, 22 Apr 2020 01:34:03 +0000 (10:34 +0900)]
Rollup merge of #70998 - estebank:suggest-impl-trait-empty-fn, r=varkor

Suggest `-> impl Trait` and `-> Box<dyn Trait>` on fn that doesn't return

During development, a function could have a return type set that is a
bare trait object by accident. We already suggest using either a boxed
trait object or `impl Trait` if the return paths will allow it. We now
do so too when there are *no* return paths or they all resolve to `!`.
We still don't handle cases where the trait object is *not* the entirety
of the return type gracefully.

Closes #38376.

4 years agoAuto merge of #71402 - ehuss:update-cargo, r=ehuss
bors [Wed, 22 Apr 2020 00:50:49 +0000 (00:50 +0000)]
Auto merge of #71402 - ehuss:update-cargo, r=ehuss

Update cargo, rls

## cargo

17 commits in ebda5065ee8a1e46801380abcbac21a25bc7e755..8751eb3010d4cdb5329b5a6bd2b6d765c95b0dca
2020-04-16 14:28:43 +0000 to 2020-04-21 18:04:35 +0000
- Uplift windows gnu DLL import libraries. (rust-lang/cargo#8141)
- Add windows-gnu CI and fix tests (rust-lang/cargo#8139)
- Several updates to token/index handling. (rust-lang/cargo#7973)
- Add `resolver` opt-in for new feature resolver. (rust-lang/cargo#8129)
- Improve error message when running `cargo install .` (rust-lang/cargo#8137)
- fix mem replace unused (rust-lang/cargo#8138)
- Change `-Cembed-bitcode=no` use to `-Cbitcode-in-rlib=no`. (rust-lang/cargo#8134)
- Refactor BuildContext (rust-lang/cargo#8068)
- Rename allows_underscores to allows_dashes. (rust-lang/cargo#8135)
- Fixed a needless borrow. (rust-lang/cargo#8130)
- Add link to changelog in the Cargo book. (rust-lang/cargo#8126)
- Fix target for doc test cross compilation (rust-lang/cargo#8094)
- Add note about .cargo/config support. (rust-lang/cargo#8125)
- Fix pdb uplift when executable has dashes. (rust-lang/cargo#8123)
- Hint upgrading for future edition keys (rust-lang/cargo#8122)
- Use some fs shorthand functions. (rust-lang/cargo#8124)
- Update documentation to mention "config.toml" instead of "config" (rust-lang/cargo#8121)

## rls

1 commits in 2659cbf14bfb0929a16d7ce9b6858d0bb286ede7..7de2a1f299f8744ffe109139f9f1fdf28bfec909
2020-04-14 22:07:24 +0200 to 2020-04-19 22:41:55 +0000
- Update cargo (rust-lang-nursery/rls#1663)

4 years agoaccept cfg_if suggestion
Cameron Taggart [Tue, 21 Apr 2020 22:36:08 +0000 (16:36 -0600)]
accept cfg_if suggestion

Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
4 years agoUpdate cargo, rls
Eric Huss [Tue, 21 Apr 2020 21:11:30 +0000 (14:11 -0700)]
Update cargo, rls

4 years agovisit_place_base is just visit_local
Santiago Pastorino [Tue, 21 Apr 2020 20:11:00 +0000 (17:11 -0300)]
visit_place_base is just visit_local

4 years agoproc_macro::is_available()
David Tolnay [Tue, 21 Apr 2020 19:28:11 +0000 (12:28 -0700)]
proc_macro::is_available()

4 years agoClean up E0554 explanation
Guillaume Gomez [Tue, 21 Apr 2020 19:40:29 +0000 (21:40 +0200)]
Clean up E0554 explanation

4 years agouse cfg_if! and use FileSerializationSink for wasi
Cameron Taggart [Tue, 21 Apr 2020 19:07:05 +0000 (13:07 -0600)]
use cfg_if! and use FileSerializationSink for wasi

4 years agoImprove E0308 error message wording again
DeeDeeG [Tue, 21 Apr 2020 18:05:32 +0000 (14:05 -0400)]
Improve E0308 error message wording again

4 years agoMinor refactoring
Ayush Kumar Mishra [Tue, 21 Apr 2020 16:59:20 +0000 (22:29 +0530)]
Minor refactoring

4 years agoAssign correct span to new illegal ops
Dylan MacKenzie [Tue, 21 Apr 2020 16:24:41 +0000 (09:24 -0700)]
Assign correct span to new illegal ops

4 years agoFix incorrect description of E0690
aticu [Tue, 21 Apr 2020 16:13:58 +0000 (18:13 +0200)]
Fix incorrect description of E0690

4 years agoAdded proper explanation error code E0696
pankajchaudhary5 [Tue, 21 Apr 2020 03:54:16 +0000 (09:24 +0530)]
Added proper explanation error code E0696

4 years agoFix stage0.txt version number comment
Ralf Jung [Tue, 21 Apr 2020 13:56:49 +0000 (15:56 +0200)]
Fix stage0.txt version number comment

4 years agoFix formatting issue
Ayush Kumar Mishra [Tue, 21 Apr 2020 11:36:22 +0000 (17:06 +0530)]
Fix formatting issue

4 years agoRefactoring and added test-cases #70528
Ayush Kumar Mishra [Tue, 21 Apr 2020 11:18:58 +0000 (16:48 +0530)]
Refactoring and added test-cases #70528

4 years agoAuto merge of #71170 - spastorino:dyn-fnonce-alignment, r=nikomatsakis
bors [Tue, 21 Apr 2020 08:58:44 +0000 (08:58 +0000)]
Auto merge of #71170 - spastorino:dyn-fnonce-alignment, r=nikomatsakis

Make Box<dyn FnOnce> respect self alignment

Closes #68304

r? @eddyb @nikomatsakis

4 years agoFix #! (shebang) stripping account space issue #70528
Ayush Kumar Mishra [Tue, 21 Apr 2020 06:14:00 +0000 (11:44 +0530)]
Fix #! (shebang) stripping account space issue #70528

4 years agoAuto merge of #71267 - pnkfelix:issue-71248-dont-need-exports-all-green, r=nagisa
bors [Tue, 21 Apr 2020 04:35:17 +0000 (04:35 +0000)]
Auto merge of #71267 - pnkfelix:issue-71248-dont-need-exports-all-green, r=nagisa

attempt to recover perf by removing `exports_all_green`

attempt to recover perf by removing `exports_all_green` flag.

cc #71248

(My hypothesis is that my use of this flag was an overly conservative generalization of PR #67020.)

4 years ago./x.py fmt
Cameron Taggart [Tue, 21 Apr 2020 02:47:27 +0000 (20:47 -0600)]
./x.py fmt

4 years agoAuto merge of #71367 - Dylan-DPC:rollup-ysj4olr, r=Dylan-DPC
bors [Tue, 21 Apr 2020 01:26:56 +0000 (01:26 +0000)]
Auto merge of #71367 - Dylan-DPC:rollup-ysj4olr, r=Dylan-DPC

Rollup of 4 pull requests

Successful merges:

 - #69362 (Stabilize most common subset of alloc_layout_extras)
 - #71174 (Check that main/start is not async)
 - #71285 (MIR: use HirId instead of NodeId to avoid cycles while inlining)
 - #71346 (Do not build tools if user do not want them)

Failed merges:

r? @ghost

4 years agoallow wasm32 compilation of librustc_data_structures/profiling.rs
Cameron Taggart [Tue, 21 Apr 2020 00:09:11 +0000 (18:09 -0600)]
allow wasm32 compilation of librustc_data_structures/profiling.rs

4 years agoRollup merge of #71346 - mati865:rustbuild-tools, r=Mark-Simulacrum
Dylan DPC [Mon, 20 Apr 2020 22:30:58 +0000 (00:30 +0200)]
Rollup merge of #71346 - mati865:rustbuild-tools, r=Mark-Simulacrum

Do not build tools if user do not want them

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

4 years agoRollup merge of #71285 - ljedrz:mir_inline_span_for_optimized_mir, r=ecstatic-morse
Dylan DPC [Mon, 20 Apr 2020 22:30:57 +0000 (00:30 +0200)]
Rollup merge of #71285 - ljedrz:mir_inline_span_for_optimized_mir, r=ecstatic-morse

MIR: use HirId instead of NodeId to avoid cycles while inlining

I wanted to see if I could limit the number of uses of `NodeId` when `HirId` is available and I saw that some of the MIR `Inliner` code could use `Span` instead of `NodeId`, not unlike in https://github.com/rust-lang/rust/pull/71197.

~If I'm understanding the reason for not calling `optimized_mir` in incremental builds here correctly, this change could also allow us to do so.~

This change could affect performance, so if this approach makes sense, a perf run is probably a good idea.