make type_kind exhaustive, add an entry for type_self (in particular)

This commit is contained in:
Niko Matsakis 2012-03-27 15:42:37 -07:00
parent 42f2810eca
commit c9102ee7a1

View File

@ -985,7 +985,9 @@ fn type_kind(cx: ctxt, ty: t) -> kind {
param_bounds_to_kind(cx.ty_param_bounds.get(did.node))
}
ty_constr(t, _) { type_kind(cx, t) }
_ { cx.sess.bug("bad type in type_kind"); }
ty_class(_, _) { fail "FIXME"; }
ty_var(_) { fail "FIXME"; }
ty_self(_) { kind_noncopyable }
};
cx.kind_cache.insert(ty, result);