Skip to content

Commit bcbc5c8

Browse files
committed
---
yaml --- r: 89016 b: refs/heads/snap-stage3 c: f857398 h: refs/heads/master v: v3
1 parent 1271b35 commit bcbc5c8

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 473d0480954ac12bd6c73aa8dab20674ff74a21a
4+
refs/heads/snap-stage3: f857398bc960e683efd0923181c4a7fbd5497cf8
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/resolve.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4147,9 +4147,11 @@ impl Resolver {
41474147
fn resolve_arm(&mut self, arm: &Arm) {
41484148
self.value_ribs.push(@Rib::new(NormalRibKind));
41494149

4150-
let bindings_list = @mut HashMap::new();
4150+
let mut bindings_list = HashMap::new();
41514151
for pattern in arm.pats.iter() {
4152-
self.resolve_pattern(*pattern, RefutableMode, Some(bindings_list));
4152+
self.resolve_pattern(*pattern,
4153+
RefutableMode,
4154+
Some(&mut bindings_list));
41534155
}
41544156

41554157
// This has to happen *after* we determine which
@@ -4298,7 +4300,7 @@ impl Resolver {
42984300
mode: PatternBindingMode,
42994301
// Maps idents to the node ID for the (outermost)
43004302
// pattern that binds them
4301-
bindings_list: Option<@mut HashMap<Name,NodeId>>) {
4303+
mut bindings_list: Option<&mut HashMap<Name,NodeId>>) {
43024304
let pat_id = pattern.id;
43034305
walk_pat(pattern, |pattern| {
43044306
match pattern.node {
@@ -4388,7 +4390,7 @@ impl Resolver {
43884390
// passes make about or-patterns.)
43894391

43904392
match bindings_list {
4391-
Some(bindings_list)
4393+
Some(ref mut bindings_list)
43924394
if !bindings_list.contains_key(&renamed) => {
43934395
let this = &mut *self;
43944396
let last_rib = this.value_ribs[
@@ -4401,7 +4403,7 @@ impl Resolver {
44014403
}
44024404
bindings_list.insert(renamed, pat_id);
44034405
}
4404-
Some(b) => {
4406+
Some(ref mut b) => {
44054407
if b.find(&renamed) == Some(&pat_id) {
44064408
// Then this is a duplicate variable
44074409
// in the same disjunct, which is an

0 commit comments

Comments
 (0)