rustc: Make region dereference no longer require an unsafe block

This commit is contained in:
Patrick Walton 2012-03-14 16:17:45 -07:00
parent 0cd72d24dc
commit fd9c9ac912

View file

@ -2337,13 +2337,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
oper_t = inner.ty;
require_unsafe(tcx.sess, fcx.purity, expr.span);
}
ty::ty_rptr(_, inner) {
// FIXME: This shouldn't be unsafe for now, but we enforce it
// for now to safeguard the language until we're properly
// typechecking regions.
oper_t = inner.ty;
require_unsafe(tcx.sess, fcx.purity, expr.span);
}
ty::ty_rptr(_, inner) { oper_t = inner.ty; }
_ {
tcx.sess.span_err(expr.span,
#fmt("Type %s cannot be dereferenced",