-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Procs do not capture mutability #11958
Comments
When I pull the shadowing out of the test, I'm seeing: |
Ultimately the cause of this error is the categorization created by |
@nikomatsakis , ok trying to understand this. I'm guessing I'm getting warmer? Not sure what a "one shot stack closure" is. |
@nickdesaulniers the relevant line is here. A "one shot stack closure" is often called a "once closure" -- not currently really supported, though some code exists -- it's a closure that only executes once, but which is stored on the stack. In any case, a |
@nikomatsakis , I had changed the mutbl member to be |
Do not suggest `[T; n]` instead of `vec![T; n]` if `T` is not `Copy` changelog: [`useless_vec`]: do not suggest replacing `&vec![T; N]` by `&[T; N]` if `T` is not `Copy` Fix rust-lang#11958
As an extension of the work from #10617 & #11626 , a proc shouldn't have to shadow a variable to get the mutability. This shouldn't be necessary.
The text was updated successfully, but these errors were encountered: