File tree Expand file tree Collapse file tree 3 files changed +16
-10
lines changed
tests/ui/ergonomic-clones Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 1+ //@ check-pass
2+ //@ edition:2018
3+
4+ #![ feature( ergonomic_clones) ]
5+
6+ use std:: future:: Future ;
7+
8+ fn ergonomic_clone_async_closures ( ) -> impl Future < Output = String > {
9+ let s = String :: from ( "hi" ) ;
10+
11+ async use {
12+ s
13+ }
14+ }
15+
16+ fn main ( ) { }
Original file line number Diff line number Diff line change 11//@ check-pass
2- //@ edition:2018
32
43#![ feature( ergonomic_clones) ]
54
65use std:: clone:: UseCloned ;
7- use std:: future:: Future ;
86
97fn ergonomic_clone_closure_no_captures ( ) -> i32 {
108 let cl = use || {
@@ -41,12 +39,4 @@ fn ergonomic_clone_closure_use_cloned() -> Foo {
4139 f
4240}
4341
44- fn ergonomic_clone_async_closures ( ) -> impl Future < Output = String > {
45- let s = String :: from ( "hi" ) ;
46-
47- async use {
48- s
49- }
50- }
51-
5242fn main ( ) { }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments