Skip to content

Commit e7575b9

Browse files
committed
rustc: Add cases for istr and ivec to visit
1 parent 834f90f commit e7575b9

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/comp/middle/visit.rs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,23 @@ fn visit_item[E](&@item i, &E e, &vt[E] v) {
142142

143143
fn visit_ty[E](&@ty t, &E e, &vt[E] v) {
144144
alt (t.node) {
145-
case (ty_box(?mt)) { vt(v).visit_ty(mt.ty, e, v); }
146-
case (ty_vec(?mt)) { vt(v).visit_ty(mt.ty, e, v); }
147-
case (ty_ptr(?mt)) { vt(v).visit_ty(mt.ty, e, v); }
148-
case (ty_port(?t)) { vt(v).visit_ty(t, e, v); }
149-
case (ty_chan(?t)) { vt(v).visit_ty(t, e, v); }
145+
case (ty_nil) { /* no-op */ }
146+
case (ty_bot) { /* no-op */ }
147+
case (ty_bool) { /* no-op */ }
148+
case (ty_int) { /* no-op */ }
149+
case (ty_float) { /* no-op */ }
150+
case (ty_uint) { /* no-op */ }
151+
case (ty_machine(_)) { /* no-op */ }
152+
case (ty_char) { /* no-op */ }
153+
case (ty_str) { /* no-op */ }
154+
case (ty_istr) { /* no-op */ }
155+
case (ty_box(?mt)) { vt(v).visit_ty(mt.ty, e, v); }
156+
case (ty_vec(?mt)) { vt(v).visit_ty(mt.ty, e, v); }
157+
case (ty_ivec(?mt)) { vt(v).visit_ty(mt.ty, e, v); }
158+
case (ty_ptr(?mt)) { vt(v).visit_ty(mt.ty, e, v); }
159+
case (ty_port(?t)) { vt(v).visit_ty(t, e, v); }
160+
case (ty_chan(?t)) { vt(v).visit_ty(t, e, v); }
161+
case (ty_task) { /* no-op */ }
150162
case (ty_tup(?mts)) {
151163
for (mt mt in mts) { vt(v).visit_ty(mt.ty, e, v); }
152164
}
@@ -169,8 +181,8 @@ fn visit_ty[E](&@ty t, &E e, &vt[E] v) {
169181
case (ty_path(?p, _)) {
170182
for (@ty tp in p.node.types) { vt(v).visit_ty(tp, e, v); }
171183
}
184+
case (ty_type) { /* no-op */ }
172185
case (ty_constr(?t, _)) { vt(v).visit_ty(t, e, v); }
173-
case (_) { }
174186
}
175187
}
176188

0 commit comments

Comments
 (0)