Skip to content

Commit 57d8c9f

Browse files
committed
---
yaml --- r: 13506 b: refs/heads/master c: 68670f6 h: refs/heads/master v: v3
1 parent ee17f47 commit 57d8c9f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: e6c613ffa514fc72bb7c818401b41a22ca03cdf0
2+
refs/heads/master: 68670f631c22b1cab5eaa29aab4d97c94117c424
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/ty.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,6 +1876,8 @@ fn type_is_pod(cx: ctxt, ty: t) -> bool {
18761876
ty_type | ty_ptr(_) { result = true; }
18771877
// Boxed types
18781878
ty_str | ty_box(_) | ty_uniq(_) | ty_vec(_) | ty_fn(_) |
1879+
ty_estr(vstore_uniq) | ty_estr(vstore_box) |
1880+
ty_evec(_, vstore_uniq) | ty_evec(_, vstore_box) |
18791881
ty_iface(_, _) | ty_rptr(_,_) | ty_opaque_box { result = false; }
18801882
// Structural types
18811883
ty_enum(did, substs) {
@@ -1897,7 +1899,7 @@ fn type_is_pod(cx: ctxt, ty: t) -> bool {
18971899
for elts.each {|elt| if !type_is_pod(cx, elt) { result = false; } }
18981900
}
18991901
ty_estr(vstore_fixed(_)) { result = true; }
1900-
ty_evec(mt, vstore_fixed(_)) {
1902+
ty_evec(mt, vstore_fixed(_)) | ty_unboxed_vec(mt) {
19011903
result = type_is_pod(cx, mt.ty);
19021904
}
19031905
ty_res(_, inner, substs) {
@@ -1913,7 +1915,14 @@ fn type_is_pod(cx: ctxt, ty: t) -> bool {
19131915
type_is_pod(cx, sty)
19141916
};
19151917
}
1916-
_ { cx.sess.bug("unexpected type in type_is_pod"); }
1918+
1919+
ty_estr(vstore_slice(*)) | ty_evec(_, vstore_slice(*)) {
1920+
result = false;
1921+
}
1922+
1923+
ty_var(*) | ty_var_integral(*) | ty_self(*) {
1924+
cx.sess.bug("non concrete type in type_is_pod");
1925+
}
19171926
}
19181927

19191928
ret result;

0 commit comments

Comments
 (0)