diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-02 11:37:37 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2012-10-02 14:31:39 -0700 |
| commit | f78cdcb6364cf938bfeb71da0c7eca62e257d537 (patch) | |
| tree | cb3f93224e4757b5f77709e576ca6f24ce0981ec /src/rustc | |
| parent | a5042d58ee86af13b6910fa1884b7c1fe9423ae7 (diff) | |
| download | rust-f78cdcb6364cf938bfeb71da0c7eca62e257d537.tar.gz rust-f78cdcb6364cf938bfeb71da0c7eca62e257d537.zip | |
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.
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/middle/lint.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rustc/middle/lint.rs b/src/rustc/middle/lint.rs index ebdc66156e3..0f31f2056a1 100644 --- a/src/rustc/middle/lint.rs +++ b/src/rustc/middle/lint.rs @@ -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(_) => { |
