Skip to content

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

Aaron1011 and others added 19 commits January 22, 2020 22:20
Previously, we used a plain `Predicate` to cache results (e.g. successes
and failures) in ObligationForest. However, fulfillment depends on the
precise `ParamEnv` used, so this is unsound in general.

This commit changes the impl of `ForestObligation` for
`PendingPredicateObligation` to use `ParamEnvAnd<Predicate>` instead of
`Predicate` for the associated type. The associated type and method are
renamed from 'predicate' to 'cache_key' to reflect the fact that type is
no longer just a predicate.
…reference, r=nikomatsakis

Correct inference of primitive operand type behind binary operation

Fixes rust-lang#57447.

r? @nikomatsakis
…omatsakis

Use a `ParamEnvAnd<Predicate>` for caching in `ObligationForest`

Previously, we used a plain `Predicate` to cache results (e.g. successes
and failures) in ObligationForest. However, fulfillment depends on the
precise `ParamEnv` used, so this is unsound in general.

This commit changes the impl of `ForestObligation` for
`PendingPredicateObligation` to use `ParamEnvAnd<Predicate>` instead of
`Predicate` for the associated type. The associated type and method are
renamed from 'predicate' to 'cache_key' to reflect the fact that type is
no longer just a predicate.
…sper

typeck: clarify def_bm adjustments & add tests for or-patterns

Clarify the adjustment algorithm for the expected type / default binding-modes when type checking patterns with more documentation and tweaks that make the algorithm more independent of the pattern forms.

Also resolve the FIXME noted for or-patterns by deciding that the current implementation is correct, noting the rationale and adding tests for the current implementation.

cc rust-lang#54883

r? @oli-obk @varkor
Fix extra subslice lowering

We are currently ICEing on e.g.
```rust
fn main() {
    let [.., b @ ..] = [1, 2];
    b;
}
```
This happens because `b @ ..` registers a binding such that `b;` is OK, but then we forget to lower that binding in `rustc_ast_lowering`.

Fixes rust-lang#69103.

r? @davidtwco
…ochenkov

Follow-up to rust-lang#68848

This PR contains some late changes to rust-lang#68848 that somehow didn't get included when that PR was merged in a roll-up.

r? @petrochenkov
…k, r=Dylan-DPC

Update pulldown-cmark dependency

r? @kinnison

cc @ollie27

Reopening of  rust-lang#65894.
@JohnTitor
Copy link
Member Author

@bors r+ p=7 rollup=never

@bors
Copy link
Collaborator

bors commented Feb 14, 2020

📌 Commit a6ff1db has been approved by JohnTitor

@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 Feb 14, 2020
@JohnTitor JohnTitor added the rollup A PR which is a rollup label Feb 14, 2020
@bors
Copy link
Collaborator

bors commented Feb 14, 2020

⌛ Testing commit a6ff1db with merge b92c6ee...

bors added a commit that referenced this pull request Feb 14, 2020
Rollup of 7 pull requests

Successful merges:

 - #68129 (Correct inference of primitive operand type behind binary operation)
 - #68475 (Use a `ParamEnvAnd<Predicate>` for caching in `ObligationForest`)
 - #68856 (typeck: clarify def_bm adjustments & add tests for or-patterns)
 - #69051 (simplify_try: address some of eddyb's comments)
 - #69128 (Fix extra subslice lowering)
 - #69150 (Follow-up to #68848)
 - #69164 (Update pulldown-cmark dependency)

Failed merges:

r? @ghost
@bors
Copy link
Collaborator

bors commented Feb 15, 2020

☀️ Test successful - checks-azure
Approved by: JohnTitor
Pushing b92c6ee to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 15, 2020
@bors bors merged commit a6ff1db into rust-lang:master Feb 15, 2020
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.

7 participants