-
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
can borrow mut in proc Issue 10617 #11626
Conversation
@@ -449,11 +449,6 @@ pub fn check_trait_cast_bounds(cx: &Context, sp: Span, ty: ty::t, | |||
|
|||
fn check_imm_free_var(cx: &Context, def: Def, sp: Span) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this function is a no-op now, perhaps it can be removed?
Thanks for the fix! Could you amend the message to include the phrase |
cx.tcx.sess.span_err( | ||
sp, | ||
"mutable variables cannot be implicitly captured"); | ||
} | ||
DefLocal(..) | DefArg(..) => { /* ok */ } | ||
DefUpvar(_, def1, _, _) => { check_imm_free_var(cx, *def1, sp); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this function is a no-op now, perhaps it can be removed?
Even with this branch? (Testing a build right now)
(@alexcrichton you can actually edit the PR text to include that yourself; it'll have the same effect. :) ) |
review? @alexcrichton |
Looks good to me! I'd want @nikomatsakis or someone more knowledgeable to sign off though, I'm unsure of what repercussions this has on other components. |
I will check it out soon |
Looks like this has merge conflicts now :( |
@alexcrichton : fixed. review? |
#10617