Skip to content

[nll] overly strict T: 'static bound arising from closure #53570

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
nikomatsakis opened this issue Aug 21, 2018 · 4 comments
Closed

[nll] overly strict T: 'static bound arising from closure #53570

nikomatsakis opened this issue Aug 21, 2018 · 4 comments
Assignees
Labels
A-NLL Area: Non-lexical lifetimes (NLL) NLL-complete Working towards the "valid code works" goal T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@nikomatsakis
Copy link
Contributor

The recent crater run found an incorrect T: 'static bound compiling cswinter.locustdb.c5942997e6bdbb94fe0920e67bd96b0637399b97 (log). This looks perhaps like a variant of #53119.

Minimized reproduction available here..

@nikomatsakis nikomatsakis added A-NLL Area: Non-lexical lifetimes (NLL) WG-compiler-nll NLL-complete Working towards the "valid code works" goal labels Aug 21, 2018
@nikomatsakis nikomatsakis added this to the Rust 2018 RC milestone Aug 21, 2018
@nikomatsakis nikomatsakis added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 21, 2018
@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented Aug 21, 2018

The following errors look similar, but it's hard to tell if it's the same problem:

@nikomatsakis
Copy link
Contributor Author

Did a bit of digging. The error here seems to result from us (incorrectly, I think?) promoting a '_#5 bound (which represents 'a in the minimized example) to 'static. I'm not 100% sure why this is happening yet, had to stop digging for now, will return to it.

@nikomatsakis
Copy link
Contributor Author

OK, I see the problem and have a forthcoming fix.

@nikomatsakis
Copy link
Contributor Author

Leaving this on the RC milestone — fix is in #53745

bors added a commit that referenced this issue Sep 7, 2018
do not propagate closure requirements if we can prove them locally

Fixes #53570

cc @mikhail-m1 -- you're the one who last touched this code

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 T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant