File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 91d45b91e64c4db6f07b9dd21837dac84f0a1255
2
+ refs/heads/master: 36c4cb37ad3d96897f229f2af48c76c018bb680e
Original file line number Diff line number Diff line change @@ -959,16 +959,17 @@ fn type_is_tup_like(&ctxt cx, &t ty) -> bool {
959
959
}
960
960
961
961
fn get_element_type( & ctxt cx, & t ty, uint i) -> t {
962
- assert ( type_is_tup_like( cx, ty) ) ;
963
962
alt ( struct ( cx, ty) ) {
964
963
case ( ty_tup( ?mts) ) { ret mts. ( i) . ty; }
965
964
case ( ty_rec( ?flds) ) { ret flds. ( i) . mt. ty; }
965
+ case ( _) {
966
+ cx. sess. bug( "get_element_type called on type "
967
+ + ty_to_str( cx, ty) + " - expected a \
968
+ tuple or record") ;
969
+ }
966
970
}
967
971
// NB: This is not exhaustive -- struct(cx, ty) could be a box or a
968
972
// tag.
969
-
970
- cx. sess. bug( "get_element_type called on a value other than a " +
971
- "tuple or record") ;
972
973
}
973
974
974
975
fn type_is_box( & ctxt cx, & t ty) -> bool {
You can’t perform that action at this time.
0 commit comments