-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Unsound: Borrowck missing that closure needs to be "move" #35139
Comments
The problem has to do with |
@eefriedman, hmm, but this would be a bad solution in my real code. I want to indicate that the GetProp function can borrow from its environment (as opposed to |
You can change |
typeck: use a TypeVisitor in ctp Use a TypeVisitor in ctp instead of `ty::walk` This fixes a few cases where a region could be projected out of a trait while not being constrained by the type parameters, violating rust-lang/rfcs#447 and breaking soundness. As such, this is a [breaking-change]. Fixes #35139 r? @eddyb
Here's as far as I've come in minifying the problem. It gives bad result on both Stable, Beta and Nightly according to playground.
The text was updated successfully, but these errors were encountered: