mirror of
https://github.com/servo/servo.git
synced 2025-06-17 21:04:28 +00:00
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)
This commit is contained in:
parent
a3c0366bd6
commit
930921b0c3
7 changed files with 170 additions and 77 deletions
|
@ -22,7 +22,7 @@ impl LintPass for StrToStringPass {
|
|||
fn check_expr(&mut self, cx: &Context, expr: &ast::Expr) {
|
||||
match expr.node {
|
||||
ast::ExprMethodCall(ref method, _, ref args)
|
||||
if method.node.as_str() == "to_string"
|
||||
if method.node.name.as_str() == "to_string"
|
||||
&& is_str(cx, &*args[0]) => {
|
||||
cx.span_lint(STR_TO_STRING, expr.span,
|
||||
"str.to_owned() is more efficient than str.to_string(), please use it instead");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue