allow enums that ref themselves via unsafe pointers
This commit is contained in:
parent
c6d33c3d37
commit
a7e0eb3581
@ -1475,11 +1475,14 @@ fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
|
||||
|
||||
ty_box(mt) |
|
||||
ty_uniq(mt) |
|
||||
ty_ptr(mt) |
|
||||
ty_rptr(_, mt) {
|
||||
be type_requires(cx, seen, r_ty, mt.ty);
|
||||
}
|
||||
|
||||
ty_ptr(mt) {
|
||||
false // unsafe ptrs can always be NULL
|
||||
}
|
||||
|
||||
ty_rec(fields) {
|
||||
vec::any(fields) {|field|
|
||||
type_requires(cx, seen, r_ty, field.mt.ty)
|
||||
|
Loading…
Reference in New Issue
Block a user