Skip to content

Commit ddd193a

Browse files
committed
---
yaml --- r: 127479 b: refs/heads/try c: 53a7c47 h: refs/heads/master i: 127477: 057ddc6 127475: 4c3b33e 127471: 223e8da v: v3
1 parent db94395 commit ddd193a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c4a63fabe345967e7d6b4570752ea081cae21785
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 12e0f72f517516ac4fce2aed85e6142e9b874bce
5-
refs/heads/try: 0111f493491c2d0a21db50ca06d978d8b5729ed1
5+
refs/heads/try: 53a7c47942fd55885c72cc52feb7c47bf67a222a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/borrowck/check_loans.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -764,18 +764,17 @@ impl<'a> CheckLoanCtxt<'a> {
764764
return;
765765

766766
fn mark_variable_as_used_mut(this: &CheckLoanCtxt,
767-
cmt: mc::cmt) {
767+
mut cmt: mc::cmt) {
768768
//! If the mutability of the `cmt` being written is inherited
769769
//! from a local variable, liveness will
770770
//! not have been able to detect that this variable's mutability
771771
//! is important, so we must add the variable to the
772772
//! `used_mut_nodes` table here.
773773
774-
let mut cmt = cmt;
775774
loop {
776-
debug!("mark_writes_through_upvars_as_used_mut(cmt={})",
777-
cmt.repr(this.tcx()));
775+
debug!("mark_variable_as_used_mut(cmt={})", cmt.repr(this.tcx()));
778776
match cmt.cat.clone() {
777+
mc::cat_copied_upvar(mc::CopiedUpvar { upvar_id: id, .. }) |
779778
mc::cat_local(id) | mc::cat_arg(id) => {
780779
this.tcx().used_mut_nodes.borrow_mut().insert(id);
781780
return;
@@ -792,7 +791,6 @@ impl<'a> CheckLoanCtxt<'a> {
792791

793792
mc::cat_rvalue(..) |
794793
mc::cat_static_item |
795-
mc::cat_copied_upvar(..) |
796794
mc::cat_deref(_, _, mc::UnsafePtr(..)) |
797795
mc::cat_deref(_, _, mc::BorrowedPtr(..)) |
798796
mc::cat_deref(_, _, mc::Implicit(..)) => {

0 commit comments

Comments
 (0)