Skip to content

Rollup of 6 pull requests - #65869

Merged
bors merged 22 commits into
rust-lang:masterfrom
Centril:rollup-bzlo74f
Oct 27, 2019
Merged

Rollup of 6 pull requests#65869
bors merged 22 commits into
rust-lang:masterfrom
Centril:rollup-bzlo74f

Conversation

@Centril

Copy link
Copy Markdown
Contributor

Successful merges:

Failed merges:

r? @ghost

matthewjasperand others added 22 commits October 24, 2019 21:33
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This is leftover from a restructuring of lint registration for drivers;
it should now happen via the register_lints field on Config rather than
this function.
This was originally only needed for validation, which is never run on
non-const `fn`s. The new promotion pass wants to use it, however.
This is a relic from earlier attempts at dataflow-based const validation
that attempted to do promotion at the same time. rust-lang#63812 takes a
different approach: `IsNotPromotable` is no longer a `Qualif` and is
computed lazily instead of eagerly. As a result, there's no need for an
eager `TempPromotionResolver`, and we can use the only implementer of
`QualifResolver` directly instead of through a trait.
When detecting a possible `=` -> `:` typo in a `let` binding, suggest
assigning instead of setting the type.
Co-Authored-By: varkor <github@varkor.com>
Use heuristics to suggest assignment
When detecting a possible `=` -> `:` typo in a `let` binding, suggest
assigning instead of setting the type.
Partially address rust-lang#57828.
…low-fundamental-local, r=nikomatsakis
Coherence should allow fundamental types to impl traits when they are local
After rust-lang#64414, `impl<T> Remote for Box<T> { }` is disallowed, but it is also disallowed in liballoc, where `Box` is a local type!
Enabling `#![feature(re_rebalance_coherence)]` in `liballoc` results in:
```
error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct<F>`)
--> src\liballoc\boxed.rs:1098:1
|
1098 | impl<F: ?Sized + Future + Unpin> Future for Box<F> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type parameter `F` must be used as the type parameter for some local type
```
This PR relaxes `uncover_fundamental_ty` to skip local fundamental types.
I didn't add a test since `liballoc` already fails to compile, but I can add one if needed.
r? @nikomatsakis
cc rust-lang#63599
…nsion, r=davidtwco
Don't ICE for completely unexpandable `impl Trait` types
Save the resolution of these types (to themselves) to the typeck tables so that they will eventually reach E0720.
closesrust-lang#65561
…omatsakis
Remove lint callback from driver
This is leftover from a restructuring of lint registration for drivers; it should now happen via the register_lints field on Config rather than this function.
This is not used by anyone to my knowledge (including the compiler itself); it was introduced in an abandoned refactor in rust-lang#65193.
…r=eddyb
Clean up `check_consts` now that new promotion pass is implemented
`check_consts::resolver` contained a layer of abstraction (`QualifResolver`) to allow the existing, eager style of qualif propagation to work with either a dataflow results cursor or by applying the transfer function directly (if dataflow was not needed e.g. for promotion). However, rust-lang#63812 uses a different, lazy paradigm for checking promotability, which makes this unnecessary. This PR cleans up `check_consts::validation` to use `FlowSensitiveResolver` directly, instead of through the now obselete `QualifResolver` API.
Also, this contains a few commits (the first four) that address some FIXMEs in rust-lang#63812 regarding code duplication. They could be split out, but I think they will be relatively noncontroversial? Notably, `validation::Mode` is renamed to `ConstKind` and used in `promote_consts` to denote what kind of item we are in.
This is best reviewed commit-by-commit and is low priority.
r? @eddyb
… r=varkor
Add long error explaination for E0666
In the spirit of the month of spooks, here's a long explanation for E0666 for rust-lang#61137.
@Centril

Copy link
Copy Markdown
ContributorAuthor

@bors r+ p=6 rollup=never

@bors

bors commented Oct 27, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit b5b4f9b has been approved by Centril

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 27, 2019
@CentrilCentril added the rollup A PR which is a rollup label Oct 27, 2019
@bors

bors commented Oct 27, 2019

Copy link
Copy Markdown
Collaborator

⌛ Testing commit b5b4f9b with merge 95f437b...

bors added a commit that referenced this pull request Oct 27, 2019
Rollup of 6 pull requests
Successful merges:
- #65566 (Use heuristics to suggest assignment)
- #65738 (Coherence should allow fundamental types to impl traits when they are local)
- #65777 (Don't ICE for completely unexpandable `impl Trait` types)
- #65834 (Remove lint callback from driver)
- #65839 (Clean up `check_consts` now that new promotion pass is implemented)
- #65855 (Add long error explaination for E0666)
Failed merges:
r? @ghost
@bors

bors commented Oct 27, 2019

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 95f437b to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Oct 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: 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.

8 participants

@Centril@bors@matthewjasper@Mark-Simulacrum@ecstatic-morse@ohadravid@estebank@ObsidianMinor