aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-02 14:58:55 -0700
committerGraydon Hoare <[email protected]>2010-07-02 14:58:55 -0700
commit6d58987538ed21b3ee3362cb6de3685df2021e45 (patch)
tree2ad98ea22cfdc93ee25a262e14ee9f1240e86cff /src/boot
parentMinor clarification/typo-correcting edits to manual sections up to and includ... (diff)
downloadrust-6d58987538ed21b3ee3362cb6de3685df2021e45.tar.xz
rust-6d58987538ed21b3ee3362cb6de3685df2021e45.zip
Walk (mut/constr stripped) TY_iso edges when boxed. Fault on non-boxed edges; they should not have made it past resolve.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/me/trans.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml
index fdbe6f45..d27b75b1 100644
--- a/src/boot/me/trans.ml
+++ b/src/boot/me/trans.ml
@@ -2613,10 +2613,11 @@ let trans_visitor
(curr_iso:Ast.ty_iso option)
(t:Ast.ty)
: Ast.ty =
- match (curr_iso, t) with
- (Some iso, Ast.TY_idx n) ->
+ match (curr_iso, strip_mutable_or_constrained_ty t) with
+ (_, Ast.TY_idx _) -> bug () "traversing raw TY_idx (non-box )edge"
+ | (Some iso, Ast.TY_box (Ast.TY_idx n)) ->
Ast.TY_box (Ast.TY_iso { iso with Ast.iso_index = n })
- | (None, Ast.TY_idx _) ->
+ | (None, Ast.TY_box (Ast.TY_idx _)) ->
bug () "TY_idx outside TY_iso"
| _ -> t
@@ -2624,8 +2625,8 @@ let trans_visitor
(t:Ast.ty)
(curr_iso:Ast.ty_iso option)
: Ast.ty_iso option =
- match t with
- Ast.TY_iso tiso -> Some tiso
+ match strip_mutable_or_constrained_ty t with
+ Ast.TY_box (Ast.TY_iso tiso) -> Some tiso
| _ -> curr_iso
and mark_slot