File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
branches/try2/src/librustc/middle/trans Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: fc0b466fd47ebe7f40a08276cbb26ef1f5657fce
8
+ refs/heads/try2: 4b4ff2cf8b5f888581d41b3b2f10dacf7d716478
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ use middle::ty;
219
219
use util:: common:: indenter;
220
220
use util:: ppaux:: { Repr , vec_map_to_str} ;
221
221
222
+ use std:: cell:: Cell ;
222
223
use std:: hashmap:: HashMap ;
223
224
use std:: ptr;
224
225
use std:: vec;
@@ -1188,19 +1189,19 @@ struct DynamicFailureHandler {
1188
1189
bcx : @Block ,
1189
1190
sp : Span ,
1190
1191
msg : @str ,
1191
- finished : @mut Option < BasicBlockRef > ,
1192
+ finished : @Cell < Option < BasicBlockRef > > ,
1192
1193
}
1193
1194
1194
1195
impl CustomFailureHandler for DynamicFailureHandler {
1195
1196
fn handle_fail ( & self ) -> BasicBlockRef {
1196
- match * self . finished {
1197
+ match self . finished . get ( ) {
1197
1198
Some ( bb) => return bb,
1198
1199
_ => ( ) ,
1199
1200
}
1200
1201
1201
1202
let fail_cx = sub_block ( self . bcx , "case_fallthrough" ) ;
1202
1203
controlflow:: trans_fail ( fail_cx, Some ( self . sp ) , self . msg ) ;
1203
- * self . finished = Some ( fail_cx. llbb ) ;
1204
+ self . finished . set ( Some ( fail_cx. llbb ) ) ;
1204
1205
fail_cx. llbb
1205
1206
}
1206
1207
}
@@ -1911,7 +1912,7 @@ fn trans_match_inner(scope_cx: @Block,
1911
1912
let chk = {
1912
1913
if ty:: type_is_empty ( tcx, t) {
1913
1914
// Special case for empty types
1914
- let fail_cx = @mut None ;
1915
+ let fail_cx = @Cell :: new ( None ) ;
1915
1916
let fail_handler = @DynamicFailureHandler {
1916
1917
bcx : scope_cx,
1917
1918
sp : discr_expr. span ,
You can’t perform that action at this time.
0 commit comments