diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-01-20 14:45:36 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-01-20 14:49:07 +0100 |
commit | 01ed338746ae71493984259335197e6b66daec45 (patch) | |
tree | b568699de2c64d6f4eb21b197fd648c354d0ed37 /components/plugins/lints/str_to_string.rs | |
parent | 2d5b0e085571594e7da2ee519605dd6fac2caa54 (diff) | |
download | servo-01ed338746ae71493984259335197e6b66daec45.tar.gz servo-01ed338746ae71493984259335197e6b66daec45.zip |
Move to to_owned rather than into_string.
into_string has been removed from Rust.
Diffstat (limited to 'components/plugins/lints/str_to_string.rs')
-rw-r--r-- | components/plugins/lints/str_to_string.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/plugins/lints/str_to_string.rs b/components/plugins/lints/str_to_string.rs index d02e0d9bfde..d6272f4d629 100644 --- a/components/plugins/lints/str_to_string.rs +++ b/components/plugins/lints/str_to_string.rs @@ -8,9 +8,9 @@ use rustc::middle::ty::expr_ty; use rustc::middle::ty; declare_lint!(STR_TO_STRING, Deny, - "Warn when a String could use into_string() instead of to_string()") + "Warn when a String could use to_owned() instead of to_string()") -/// Prefer str.into_string() over str.to_string() +/// Prefer str.to_owned() over str.to_string() /// /// The latter creates a `Formatter` and is 5x slower than the former pub struct StrToStringPass; @@ -26,7 +26,7 @@ impl LintPass for StrToStringPass { if method.node.as_str() == "to_string" && is_str(cx, &*args[0]) => { cx.span_lint(STR_TO_STRING, expr.span, - "str.into_string() is more efficient than str.to_string(), please use it instead"); + "str.to_owned() is more efficient than str.to_string(), please use it instead"); }, _ => () } |