@@ -592,7 +592,7 @@ fn mk_iter_body_fn(cx: ctxt, output: t) -> t {
592
592
}
593
593
594
594
// Returns the one-level-deep type structure of the given type.
595
- fn struct ( cx : ctxt , typ : t ) -> sty { ret interner:: get ( * cx. ts , typ) . struct ; }
595
+ pure fn struct ( cx : ctxt , typ : t ) -> sty { interner:: get ( * cx. ts , typ) . struct }
596
596
597
597
598
598
// Returns the canonical name of the given type.
@@ -862,36 +862,36 @@ fn get_element_type(cx: ctxt, ty: t, i: uint) -> t {
862
862
// tag.
863
863
}
864
864
865
- fn type_is_box ( cx : ctxt , ty : t ) -> bool {
865
+ pure fn type_is_box ( cx: ctxt, ty: t) -> bool {
866
866
alt struct( cx, ty) {
867
867
ty_box ( _) { ret true ; }
868
868
_ { ret false; }
869
869
}
870
870
}
871
871
872
- fn type_is_boxed ( cx : ctxt , ty : t ) -> bool {
872
+ pure fn type_is_boxed ( cx : ctxt , ty : t ) -> bool {
873
873
alt struct( cx, ty) {
874
874
ty_box ( _) { ret true ; }
875
875
_ { ret false; }
876
876
}
877
877
}
878
878
879
- fn type_is_unique_box ( cx : ctxt , ty : t ) -> bool {
879
+ pure fn type_is_unique_box ( cx : ctxt , ty : t ) -> bool {
880
880
alt struct( cx, ty) {
881
881
ty_uniq ( _) { ret true ; }
882
882
_ { ret false; }
883
883
}
884
884
}
885
885
886
- fn type_is_vec ( cx : ctxt , ty : t ) -> bool {
886
+ pure fn type_is_vec ( cx : ctxt , ty : t ) -> bool {
887
887
ret alt struct ( cx, ty) {
888
888
ty_vec ( _) { true }
889
889
ty_str. { true }
890
890
_ { false }
891
891
} ;
892
892
}
893
893
894
- fn type_is_unique ( cx : ctxt , ty : t ) -> bool {
894
+ pure fn type_is_unique ( cx : ctxt , ty : t ) -> bool {
895
895
alt struct( cx, ty) {
896
896
ty_uniq ( _) { ret true ; }
897
897
ty_vec ( _) { true }
@@ -900,7 +900,7 @@ fn type_is_unique(cx: ctxt, ty: t) -> bool {
900
900
}
901
901
}
902
902
903
- fn type_is_scalar ( cx : ctxt , ty : t ) -> bool {
903
+ pure fn type_is_scalar ( cx : ctxt , ty : t ) -> bool {
904
904
alt struct( cx, ty) {
905
905
ty_nil. { ret true ; }
906
906
ty_bool. { ret true ; }
0 commit comments