@@ -198,7 +198,6 @@ use back::abi;
198
198
use driver:: session:: FullDebugInfo ;
199
199
use lib:: llvm:: { llvm, ValueRef , BasicBlockRef } ;
200
200
use middle:: const_eval;
201
- use middle:: borrowck:: root_map_key;
202
201
use middle:: lang_items:: { UniqStrEqFnLangItem , StrEqFnLangItem } ;
203
202
use middle:: pat_util:: * ;
204
203
use middle:: resolve:: DefMap ;
@@ -1156,14 +1155,6 @@ fn collect_record_or_struct_fields<'a>(
1156
1155
}
1157
1156
}
1158
1157
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 : 0 u } ;
1163
- bcx. ccx ( ) . maps . root_map . contains_key ( & key)
1164
- } )
1165
- }
1166
-
1167
1158
// Macro for deciding whether any of the remaining matches fit a given kind of
1168
1159
// pattern. Note that, because the macro is well-typed, either ALL of the
1169
1160
// matches should fit that sort of pattern or NONE (however, some of the
@@ -1551,10 +1542,6 @@ fn compile_submatch_continue<'a, 'b>(
1551
1542
}
1552
1543
}
1553
1544
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
-
1558
1545
match collect_record_or_struct_fields ( bcx, m, col) {
1559
1546
Some ( ref rec_fields) => {
1560
1547
let pat_ty = node_id_type ( bcx, pat_id) ;
0 commit comments