diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-05 14:58:42 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-05 15:37:01 -0700 |
| commit | e16dbb7888504ef5d0de0c14493fc8ecc492ee30 (patch) | |
| tree | 80c1bde3c3f3b0cf47993dfe769418cc2ac55323 /src/rustc | |
| parent | e3cb70fa8a6f9163352f26ae2614ab4c9a261838 (diff) | |
Demode some code using by-mutbl-ref; warn about by-mutbl-ref
The parser now warns about use of mutbl-ref mode, though it's kind of a lie since this commit doesn't remove support for the mode. Changed move_val_init to have stage0 and stage1/2 versions, the latter of which is demoded. Changed the type that the typechecker expects the move_val_init intrinsic to have. After this is pushed, I can make a new snapshot, which will remove the need for the stage0 versions.
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/middle/typeck/check.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rustc/middle/typeck/check.rs b/src/rustc/middle/typeck/check.rs index 368b69cafab..7cc2c8b0ad7 100644 --- a/src/rustc/middle/typeck/check.rs +++ b/src/rustc/middle/typeck/check.rs @@ -2601,7 +2601,9 @@ fn check_intrinsic_type(ccx: @crate_ctxt, it: @ast::foreign_item) { ~"addr_of" => (1u, ~[arg(ast::by_ref, param(ccx, 0u))], ty::mk_imm_ptr(tcx, param(ccx, 0u))), ~"move_val" | ~"move_val_init" => { - (1u, ~[arg(ast::by_mutbl_ref, param(ccx, 0u)), + (1u, ~[arg(ast::by_copy, + ty::mk_mut_rptr(tcx, ty::re_bound(ty::br_anon(0)), + param(ccx, 0u))), arg(ast::by_move, param(ccx, 0u))], ty::mk_nil(tcx)) } |
