Skip to content

Commit 3c1b1a3

Browse files
committed
rustc: Remove root_map usage from _match
1 parent 13c8edf commit 3c1b1a3

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/librustc/middle/trans/_match.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ use back::abi;
198198
use driver::session::FullDebugInfo;
199199
use lib::llvm::{llvm, ValueRef, BasicBlockRef};
200200
use middle::const_eval;
201-
use middle::borrowck::root_map_key;
202201
use middle::lang_items::{UniqStrEqFnLangItem, StrEqFnLangItem};
203202
use middle::pat_util::*;
204203
use middle::resolve::DefMap;
@@ -1156,14 +1155,6 @@ fn collect_record_or_struct_fields<'a>(
11561155
}
11571156
}
11581157

1159-
fn pats_require_rooting(bcx: &Block, m: &[Match], col: uint) -> bool {
1160-
m.iter().any(|br| {
1161-
let pat_id = br.pats.get(col).id;
1162-
let key = root_map_key {id: pat_id, derefs: 0u };
1163-
bcx.ccx().maps.root_map.contains_key(&key)
1164-
})
1165-
}
1166-
11671158
// Macro for deciding whether any of the remaining matches fit a given kind of
11681159
// pattern. Note that, because the macro is well-typed, either ALL of the
11691160
// matches should fit that sort of pattern or NONE (however, some of the
@@ -1551,10 +1542,6 @@ fn compile_submatch_continue<'a, 'b>(
15511542
}
15521543
}
15531544

1554-
// If we are not matching against an `@T`, we should not be
1555-
// required to root any values.
1556-
assert!(!pats_require_rooting(bcx, m, col));
1557-
15581545
match collect_record_or_struct_fields(bcx, m, col) {
15591546
Some(ref rec_fields) => {
15601547
let pat_ty = node_id_type(bcx, pat_id);

0 commit comments

Comments
 (0)