Skip to content

[NLL] Possible proptest-arbitrary-0.2.2 regression #53789

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

Closed
lqd opened this issue Aug 29, 2018 · 4 comments
Closed

[NLL] Possible proptest-arbitrary-0.2.2 regression #53789

lqd opened this issue Aug 29, 2018 · 4 comments
Assignees
Labels
A-NLL Area: Non-lexical lifetimes (NLL) NLL-complete Working towards the "valid code works" goal

Comments

@lqd
Copy link
Member

lqd commented Aug 29, 2018

Filing for investigation.

The recent crater run found an interesting case in proptest-arbitrary 0.2.2, which used to compile with AST borrowck.

Crater logs.

There are 2 reproductions:

  • the first collates the necessary parts from proptest-arbitrary and proptest and reproduces faithfully the messages from the crater run. Playground.
  • the second is a bit more minimal, while still being accepted by AST borrowck. It is however, in an effort to simplify the code, partially automatically reduced to focus on only one of these two identical errors. Playground.
@lqd lqd added the A-NLL Area: Non-lexical lifetimes (NLL) label Aug 29, 2018
@nikomatsakis
Copy link
Contributor

I believe this is likely a duplicate of #53121

@lqd
Copy link
Member Author

lqd commented Aug 29, 2018

@nikomatsakis they might be sharing the same cause, but lacking the specific conditions that only fail with --crate-type lib in #53121

@nikomatsakis nikomatsakis added this to the Edition 2018 RC 2 milestone Sep 11, 2018
@nikomatsakis nikomatsakis added the NLL-complete Working towards the "valid code works" goal label Sep 11, 2018
@nikomatsakis nikomatsakis self-assigned this Sep 11, 2018
@nikomatsakis
Copy link
Contributor

Adding to the RC 2 milestone. Hopefully a dup of #53121. Assigning to myself as I am investigating both of them now.

@nikomatsakis
Copy link
Contributor

Fix in #54453

bors added a commit that referenced this issue Sep 26, 2018
…=pnkfelix

rework how we handle outlives relationships

When we encounter an outlives relationship involving a projection, we use to over-constrain in some cases with region constraints. We also used to evaluate whether the where-clauses in the environment might apply **before** running inference.

We now avoid doing both of those things:

- If there are where-clauses in the environment that might be useful, we add no constraints.
- After inference is done, we check if we wound up inferring values compatible with the where-clause, and make use of them if so.

I realize now that this PR includes some meandering commits and refactorings from when I expected to go in a different direction. If desired, I could try to remove some of those.

Fixes #53121
Fixes #53789

r? @pnkfelix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) NLL-complete Working towards the "valid code works" goal
Projects
None yet
Development

No branches or pull requests

2 participants