File tree 3 files changed +16
-10
lines changed
tests/ui/ergonomic-clones
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 1
1
//@ check-pass
2
- //@ edition:2018
3
2
4
3
#![ feature( ergonomic_clones) ]
5
4
6
5
use std:: clone:: UseCloned ;
7
- use std:: future:: Future ;
8
6
9
7
fn ergonomic_clone_closure_no_captures ( ) -> i32 {
10
8
let cl = use || {
@@ -41,12 +39,4 @@ fn ergonomic_clone_closure_use_cloned() -> Foo {
41
39
f
42
40
}
43
41
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
-
52
42
fn main ( ) { }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments