Skip to content

Commit fd9c9ac

Browse files
committed
rustc: Make region dereference no longer require an unsafe block
1 parent 0cd72d2 commit fd9c9ac

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/rustc/middle/typeck.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,13 +2337,7 @@ fn check_expr_with_unifier(fcx: @fn_ctxt, expr: @ast::expr, unify: unifier,
23372337
oper_t = inner.ty;
23382338
require_unsafe(tcx.sess, fcx.purity, expr.span);
23392339
}
2340-
ty::ty_rptr(_, inner) {
2341-
// FIXME: This shouldn't be unsafe for now, but we enforce it
2342-
// for now to safeguard the language until we're properly
2343-
// typechecking regions.
2344-
oper_t = inner.ty;
2345-
require_unsafe(tcx.sess, fcx.purity, expr.span);
2346-
}
2340+
ty::ty_rptr(_, inner) { oper_t = inner.ty; }
23472341
_ {
23482342
tcx.sess.span_err(expr.span,
23492343
#fmt("Type %s cannot be dereferenced",

0 commit comments

Comments
 (0)