We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unnecessary_to_owned
1 parent a4ebf6f commit 366234aCopy full SHA for 366234a
clippy_lints/src/methods/mod.rs
@@ -1895,6 +1895,11 @@ declare_clippy_lint! {
1895
/// ### Why is this bad?
1896
/// The unnecessary calls result in useless allocations.
1897
///
1898
+ /// ### Known problems
1899
+ /// `unnecessary_to_owned` can falsely trigger if `IntoIterator::into_iter` is applied to an
1900
+ /// owned copy of a resource and the resource is later used mutably. See
1901
+ /// [#8148](https://github.com/rust-lang/rust-clippy/issues/8148).
1902
+ ///
1903
/// ### Example
1904
/// ```rust
1905
/// let path = std::path::Path::new("x");
0 commit comments