Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #70343

Merged
merged 50 commits into from
Mar 24, 2020
Merged

Rollup of 11 pull requests #70343

merged 50 commits into from
Mar 24, 2020

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 23, 2020

Successful merges:

Failed merges:

r? @ghost

ecstatic-morse and others added 30 commits March 17, 2020 16:09
With rust-lang#70166 merged, `RangeInclusive` now derives `PartialEq` and `Eq`, implementing structural equality and as a side effect the range is now usable with const generics, closing rust-lang#70155.

A test is added to avoid a change to the private fields or the equality implementation of the range from subtly reverting rust-lang#70155.
In addition to the regression test of `RangeInclusive` for rust-lang#70155, now all range types are checked for usability within const generics:

- `RangeFrom`
- `RangeFull`
- `RangeToInclusive`
- `RangeTo`
- `Range`

The test are moved from `test\ui\const-generics\issues\issue-70155` to `test\ui\const-generics\std\range` in anticipation of future similar tests for std types.
Merge tests to a single test file.
oli-obk and others added 12 commits March 24, 2020 00:16
Move the dep_graph construction to a dedicated crate.

The interface for librustc consists in two traits: `DepKind` and `DepContext`.

The `DepKind` is the main interface. It allows to probe properties of the dependency.
As before, `DepNode` is the pair of a `DepKind` object and a hash fingerprint.

The `DepContext` takes the place of the `TyCtxt`, and handles communication with the query engine.

The use of the `ImplicitCtxt` through `ty::tls` is done through the `DepKind` trait.
This may not be the best choice, but it seemed like the simplest.
Replace some desc logic in librustc_lint with article_and_desc

r? @eddyb @Centril @matthewjasper

Followup to rust-lang#69674

Blocked on rust-lang#69498
Evaluate repeat expression lengths as late as possible

Fixes rust-lang#68567

r? @varkor
…op-detector, r=RalfJung

Remove const eval loop detector

Now that there is a configurable instruction limit for CTFE (see rust-lang#67260), we can replace the loop detector with something much simpler. See rust-lang#66946 for more discussion about this. Although the instruction limit is nightly-only, the only practical way to reach the default limit uses nightly-only features as well (although CTFE will still execute code using such features inside an array initializer on stable).

This will at the very least require a crater run, since it will result in an error wherever the "long running const eval" warning appeared before. We may need to increase the default for `const_eval_limit` to work around this.

Resolves rust-lang#54384 cc rust-lang#49980
r? @oli-obk cc @RalfJung
Improve E0308 error message wording

Hi folks,

I made [a post on Reddit](https://old.reddit.com/r/rust/comments/fmi11x/consider_linting_rusts_documentationerror_text/) about how (IMO) the docs/error messages can be a bit intimidating, one thing led to another, and I was encouraged to submit a Pull Request if I felt I could re-phrase the error message that I used as an example.

So that's this Pull Request. Open to any feedback or style changes, and I understand this is subjective.

(On another note: I am happy to see [this message was recently improved](rust-lang#69139) in `master`, so it's already better than it is in stable Rust 1.42.0.)

Ideally the last sentence could be split into at least two: [sentence explaining the inferred type.] [Sentence explaining explicit type.] [Sentence that summarizes that "this is bad," and why.]

But I'm not sure how to do so; I'm wary of writing something that turns out to be technically incorrect.
…r=estebank

Fix invalid suggestion on `&mut` iterators yielding `&` references

Fixes rust-lang#69789.

rustc suggested an invalid code when `&` reference from `&mut` iterator is mutated. The compiler knew we're mutating a value behind `&` reference, but as the assignment RHS is from desugaring, it could only see the iterator expression from source and inserted `mut` there.

r? @estebank
…k,wesleywiser

get rid of ConstPropUnsupported; use ZST marker structs instead

This gets rid of yet another machine-specific error variant.

r? @oli-obk
…r=nikomatsakis

Remove `ReClosureBound`

We now substitute external names for regions in the query response.

r? @nikomatsakis
…-obk

Add regression test for rust-lang#70155.

With rust-lang#70166 merged, `RangeInclusive` now derives `PartialEq` and `Eq`, implementing structural equality and as a side effect the range is now usable with const generics, closing rust-lang#70155.

As per [rust-lang#70166 (comment)](rust-lang#70166 (comment)) a test is added to avoid a change to the private fields or the equality implementation of the range from subtly reverting rust-lang#70155.
…r=Centril

Account for bad placeholder types in where clauses

Fix rust-lang#70291. Follow up to rust-lang#69148.
@Centril Centril added the rollup A PR which is a rollup label Mar 23, 2020
@Centril
Copy link
Contributor Author

Centril commented Mar 23, 2020

@bors r+ p=11 rollup=never

@bors
Copy link
Contributor

bors commented Mar 23, 2020

📌 Commit 3b8872d has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 23, 2020
@bors
Copy link
Contributor

bors commented Mar 24, 2020

⌛ Testing commit 3b8872d with merge 342c5f3...

@bors
Copy link
Contributor

bors commented Mar 24, 2020

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 342c5f3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 24, 2020
@bors bors merged commit 342c5f3 into rust-lang:master Mar 24, 2020
@Centril Centril deleted the rollup-94egfvs branch March 24, 2020 04:08
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #70343!

Tested on commit 342c5f3.
Direct link to PR: #70343

💔 miri on windows: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Mar 24, 2020
Tested on commit rust-lang/rust@342c5f3.
Direct link to PR: <rust-lang/rust#70343>

💔 miri on windows: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung).
💔 miri on linux: test-pass → build-fail (cc @oli-obk @eddyb @RalfJung).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.