summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/redundant_closure_call_fixable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/redundant_closure_call_fixable.rs')
-rw-r--r--src/tools/clippy/tests/ui/redundant_closure_call_fixable.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/redundant_closure_call_fixable.rs b/src/tools/clippy/tests/ui/redundant_closure_call_fixable.rs
index c8a91049d..f45db8c9c 100644
--- a/src/tools/clippy/tests/ui/redundant_closure_call_fixable.rs
+++ b/src/tools/clippy/tests/ui/redundant_closure_call_fixable.rs
@@ -84,3 +84,21 @@ fn issue9956() {
bar()((|| || 42)()(), 5);
foo((|| || 42)()(), 5);
}
+
+async fn issue11357() {
+ (|| async {})().await;
+}
+
+mod issue11707 {
+ use core::future::Future;
+
+ fn spawn_on(fut: impl Future<Output = ()>) {}
+
+ fn demo() {
+ spawn_on((|| async move {})());
+ }
+}
+
+fn avoid_double_parens() {
+ std::convert::identity((|| 13_i32 + 36_i32)()).leading_zeros();
+}