X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftools%2Fclippy%2Ftests%2Fui%2Funnecessary_to_owned.rs;h=aa5394a565790c3f1478f12a56421745b4b18391;hb=0650c4078c81211fbe112df90f019a96073e42ef;hp=2128bdacddadf03fa7736e020583e5912b00a6e7;hpb=503e19d01e941b88bf6d5b28e9108d046abcfa2d;p=rust.git diff --git a/src/tools/clippy/tests/ui/unnecessary_to_owned.rs b/src/tools/clippy/tests/ui/unnecessary_to_owned.rs index 2128bdacdda..aa5394a5657 100644 --- a/src/tools/clippy/tests/ui/unnecessary_to_owned.rs +++ b/src/tools/clippy/tests/ui/unnecessary_to_owned.rs @@ -417,3 +417,12 @@ pub fn main() { predicates_are_satisfied(id("abc".to_string())); } } + +mod issue_9504 { + #![allow(dead_code)] + + async fn foo>(_: S) {} + async fn bar() { + foo(std::path::PathBuf::new().to_string_lossy().to_string()).await; + } +}