summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unnecessary_to_owned.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/unnecessary_to_owned.rs')
-rw-r--r--src/tools/clippy/tests/ui/unnecessary_to_owned.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tools/clippy/tests/ui/unnecessary_to_owned.rs b/src/tools/clippy/tests/ui/unnecessary_to_owned.rs
index 2128bdacd..3de6d0903 100644
--- a/src/tools/clippy/tests/ui/unnecessary_to_owned.rs
+++ b/src/tools/clippy/tests/ui/unnecessary_to_owned.rs
@@ -1,6 +1,6 @@
// run-rustfix
-#![allow(clippy::ptr_arg)]
+#![allow(clippy::needless_borrow, clippy::ptr_arg)]
#![warn(clippy::unnecessary_to_owned)]
#![feature(custom_inner_attributes)]
@@ -417,3 +417,12 @@ mod issue_9351 {
predicates_are_satisfied(id("abc".to_string()));
}
}
+
+mod issue_9504 {
+ #![allow(dead_code)]
+
+ async fn foo<S: AsRef<str>>(_: S) {}
+ async fn bar() {
+ foo(std::path::PathBuf::new().to_string_lossy().to_string()).await;
+ }
+}