We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6d33c3 commit a7e0eb3Copy full SHA for a7e0eb3
src/rustc/middle/ty.rs
@@ -1475,11 +1475,14 @@ fn is_instantiable(cx: ctxt, r_ty: t) -> bool {
1475
1476
ty_box(mt) |
1477
ty_uniq(mt) |
1478
- ty_ptr(mt) |
1479
ty_rptr(_, mt) {
1480
be type_requires(cx, seen, r_ty, mt.ty);
1481
}
1482
+ ty_ptr(mt) {
1483
+ false // unsafe ptrs can always be NULL
1484
+ }
1485
+
1486
ty_rec(fields) {
1487
vec::any(fields) {|field|
1488
type_requires(cx, seen, r_ty, field.mt.ty)
0 commit comments