Skip to content

Commit 7130030

Browse files
committed
---
yaml --- r: 127403 b: refs/heads/auto c: ead3edb h: refs/heads/master i: 127401: 4e6747b 127399: bc24497 v: v3
1 parent 59e0a78 commit 7130030

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 6559323a51ee4c3e148b09fa3aa7de27565ec160
16+
refs/heads/auto: ead3edb7b99216ed5e5b0c42b157cc7a6c0c1eec
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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)