Removing explicit uses of + mode
This removes most explicit uses of the + argument mode. Pending a snapshot, I had to remove the forbid(deprecated_modes) pragma from a bunch of files. I'll put it back! + mode still has to be used in a few places for functions that get moved (see task.rs) The changes outside core and std are due to the to_bytes trait and making the compiler (with legacy modes on) agree with the libraries (with legacy modes off) about modes.
This commit is contained in:
@@ -683,8 +683,12 @@ fn check_fn_deprecated_modes(tcx: ty::ctxt, fn_ty: ty::t, decl: ast::fn_decl,
|
||||
mode_to_str(arg_ast.mode));
|
||||
match arg_ast.mode {
|
||||
ast::expl(ast::by_copy) => {
|
||||
// This should warn, but we can't yet
|
||||
// since it's still used. -- tjc
|
||||
if !tcx.legacy_modes {
|
||||
tcx.sess.span_lint(
|
||||
deprecated_mode, id, id, span,
|
||||
fmt!("argument %d uses by-copy mode",
|
||||
counter));
|
||||
}
|
||||
}
|
||||
|
||||
ast::expl(_) => {
|
||||
|
||||
Reference in New Issue
Block a user