Make it illegal to move from *T. This interacts poorly with moves-based-on-type,
since it creates moves that were not apparent. It also turns out to be not widely used.
This commit is contained in:
parent
a9012a2ad1
commit
e014ab9023
@ -105,7 +105,8 @@ fn check_is_legal_to_move_from(bccx: @BorrowckCtxt,
|
||||
mc::cat_implicit_self(*) |
|
||||
mc::cat_copied_upvar(*) |
|
||||
mc::cat_deref(_, _, mc::region_ptr(*)) |
|
||||
mc::cat_deref(_, _, mc::gc_ptr(*)) => {
|
||||
mc::cat_deref(_, _, mc::gc_ptr(*)) |
|
||||
mc::cat_deref(_, _, mc::unsafe_ptr(*)) => {
|
||||
bccx.span_err(
|
||||
cmt0.span,
|
||||
fmt!("cannot move out of %s",
|
||||
@ -129,8 +130,7 @@ fn check_is_legal_to_move_from(bccx: @BorrowckCtxt,
|
||||
mc::cat_rvalue(*) |
|
||||
mc::cat_local(*) |
|
||||
mc::cat_arg(*) |
|
||||
mc::cat_self(*) |
|
||||
mc::cat_deref(_, _, mc::unsafe_ptr(*)) => {
|
||||
mc::cat_self(*) => {
|
||||
true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user