We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36789fb commit 30ab05aCopy full SHA for 30ab05a
src/librustc/middle/borrowck/gather_loans/restrictions.rs
@@ -70,18 +70,19 @@ impl<'a> RestrictionsContext<'a> {
70
mc::cat_arg(local_id) => {
71
// R-Variable, locally declared
72
let lp = Rc::new(LpVar(local_id));
73
- SafeIf(lp.clone(), vec!(lp))
+ SafeIf(lp.clone(), vec![lp])
74
}
75
76
mc::cat_upvar(upvar_id, _) => {
77
// R-Variable, captured into closure
78
let lp = Rc::new(LpUpvar(upvar_id));
79
80
81
82
- mc::cat_copied_upvar(..) => {
83
- // FIXME(#2152) allow mutation of upvars
84
- Safe
+ mc::cat_copied_upvar(mc::CopiedUpvar { upvar_id, .. }) => {
+ // R-Variable, copied/moved into closure
+ let lp = Rc::new(LpVar(upvar_id));
85
86
87
88
mc::cat_downcast(cmt_base) => {
0 commit comments