[Clippy] Swap unnecessary_owned_empty_strings to use diagnostic ite… · qinheping/verify-rust-std@1b0be2a (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Commit 1b0be2a

[Clippy] Swap unnecessary_owned_empty_strings to use diagnostic item instead of path

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -440,6 +440,7 @@ impl String {
440 440 /// ```
441 441 #[inline]
442 442 #[rustc_const_stable(feature = "const_string_new", since = "1.39.0")]
443 +#[cfg_attr(not(test), rustc_diagnostic_item = "string_new")]
443 444 #[stable(feature = "rust1", since = "1.0.0")]
444 445 #[must_use]
445 446 pub const fn new() -> String {