mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
Downgrade inefficient_to_string to pedantic
This commit is contained in:
@@ -1105,6 +1105,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
||||
LintId::of(&methods::FILTER_MAP),
|
||||
LintId::of(&methods::FILTER_MAP_NEXT),
|
||||
LintId::of(&methods::FIND_MAP),
|
||||
LintId::of(&methods::INEFFICIENT_TO_STRING),
|
||||
LintId::of(&methods::MAP_FLATTEN),
|
||||
LintId::of(&methods::OPTION_MAP_UNWRAP_OR),
|
||||
LintId::of(&methods::OPTION_MAP_UNWRAP_OR_ELSE),
|
||||
@@ -1259,7 +1260,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
||||
LintId::of(&methods::EXPECT_FUN_CALL),
|
||||
LintId::of(&methods::FILTER_NEXT),
|
||||
LintId::of(&methods::FLAT_MAP_IDENTITY),
|
||||
LintId::of(&methods::INEFFICIENT_TO_STRING),
|
||||
LintId::of(&methods::INTO_ITER_ON_REF),
|
||||
LintId::of(&methods::ITERATOR_STEP_BY_ZERO),
|
||||
LintId::of(&methods::ITER_CLONED_COLLECT),
|
||||
@@ -1652,7 +1652,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
|
||||
LintId::of(&loops::MANUAL_MEMCPY),
|
||||
LintId::of(&loops::NEEDLESS_COLLECT),
|
||||
LintId::of(&methods::EXPECT_FUN_CALL),
|
||||
LintId::of(&methods::INEFFICIENT_TO_STRING),
|
||||
LintId::of(&methods::ITER_NTH),
|
||||
LintId::of(&methods::OR_FUN_CALL),
|
||||
LintId::of(&methods::SINGLE_CHAR_PATTERN),
|
||||
|
||||
@@ -698,7 +698,7 @@
|
||||
/// ["foo", "bar"].iter().map(|&s| s.to_string());
|
||||
/// ```
|
||||
pub INEFFICIENT_TO_STRING,
|
||||
perf,
|
||||
pedantic,
|
||||
"using `to_string` on `&&T` where `T: ToString`"
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -789,7 +789,7 @@
|
||||
},
|
||||
Lint {
|
||||
name: "inefficient_to_string",
|
||||
group: "perf",
|
||||
group: "pedantic",
|
||||
desc: "using `to_string` on `&&T` where `T: ToString`",
|
||||
deprecation: None,
|
||||
module: "methods",
|
||||
|
||||
Reference in New Issue
Block a user