librustc: Add a lint mode for unnecessary copy and remove a bunch of them.

This commit is contained in:
Patrick Walton
2013-06-27 17:41:35 -07:00
parent 8c082658be
commit b4e674f6e6
59 changed files with 256 additions and 235 deletions

View File

@@ -803,9 +803,17 @@ pub fn print_ty_method(s: @ps, m: &ast::ty_method) {
hardbreak_if_not_bol(s);
maybe_print_comment(s, m.span.lo);
print_outer_attributes(s, m.attrs);
print_ty_fn(s, None, None, &None, m.purity, ast::Many,
&m.decl, Some(m.ident), &None, Some(&m.generics),
Some(/*bad*/ copy m.explicit_self.node));
print_ty_fn(s,
None,
None,
&None,
m.purity,
ast::Many,
&m.decl,
Some(m.ident),
&None,
Some(&m.generics),
Some(m.explicit_self.node));
word(s.s, ";");
}