Skip to content

Commit 64c7897

Browse files
committed
exempt unsafe ptrs from by-val checks
1 parent b61071d commit 64c7897

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rustc/middle/borrowck/gather_loans.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ fn req_loans_in_expr(ex: @ast::expr,
8686
// passing the buck onto us to enforce this)
8787

8888
alt opt_deref_kind(arg_ty.ty) {
89-
some(deref_ptr(region_ptr)) {
89+
some(deref_ptr(region_ptr)) |
90+
some(deref_ptr(unsafe_ptr)) {
9091
/* region pointers are (by induction) guaranteed */
92+
/* unsafe pointers are the user's problem */
9193
}
9294
none {
9395
/* not a pointer, no worries */

0 commit comments

Comments
 (0)