mirror of
https://github.com/servo/servo.git
synced 2025-07-30 02:30:21 +01:00
Rust upgrade to nightly 20151002
This commit is contained in:
parent
ba2714f4f6
commit
48b3259c90
8 changed files with 52 additions and 54 deletions
|
@ -24,7 +24,7 @@ impl LateLintPass for StrToStringPass {
|
|||
fn check_expr(&mut self, cx: &LateContext, expr: &hir::Expr) {
|
||||
match expr.node {
|
||||
hir::ExprMethodCall(ref method, _, ref args)
|
||||
if method.node.name.as_str() == "to_string"
|
||||
if method.node.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