File tree Expand file tree Collapse file tree 4 files changed +82
-0
lines changed
tests/ui/explicit-tail-calls Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Original file line number Diff line number Diff line change
1
+ // edition: 2021
2
+ #![ feature( explicit_tail_calls) ]
3
+
4
+ async fn a ( ) {
5
+ become b( ) ;
6
+ //~^ error: mismatched function ABIs
7
+ //~| error: mismatched signatures
8
+ }
9
+
10
+ fn b ( ) { }
11
+
12
+ fn block ( ) -> impl std:: future:: Future < Output = ( ) > {
13
+ async {
14
+ become b( ) ;
15
+ //~^ error: mismatched function ABIs
16
+ //~| error: mismatched signatures
17
+ }
18
+ }
19
+
20
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: mismatched function ABIs
2
+ --> $DIR/out-of-async.rs:5:5
3
+ |
4
+ LL | become b();
5
+ | ^^^^^^^^^^
6
+ |
7
+ = note: `become` requires caller and callee to have the same ABI
8
+ = note: caller ABI is `"rust-call"`, while callee ABI is `"Rust"`
9
+
10
+ error: mismatched signatures
11
+ --> $DIR/out-of-async.rs:5:5
12
+ |
13
+ LL | become b();
14
+ | ^^^^^^^^^^
15
+ |
16
+ = note: `become` requires caller and callee to have matching signatures
17
+ = note: caller signature: `extern "rust-call" fn(ResumeTy)`
18
+ = note: callee signature: `fn()`
19
+
20
+ error: mismatched function ABIs
21
+ --> $DIR/out-of-async.rs:14:9
22
+ |
23
+ LL | become b();
24
+ | ^^^^^^^^^^
25
+ |
26
+ = note: `become` requires caller and callee to have the same ABI
27
+ = note: caller ABI is `"rust-call"`, while callee ABI is `"Rust"`
28
+
29
+ error: mismatched signatures
30
+ --> $DIR/out-of-async.rs:14:9
31
+ |
32
+ LL | become b();
33
+ | ^^^^^^^^^^
34
+ |
35
+ = note: `become` requires caller and callee to have matching signatures
36
+ = note: caller signature: `extern "rust-call" fn(ResumeTy)`
37
+ = note: callee signature: `fn()`
38
+
39
+ error: aborting due to 4 previous errors
40
+
Original file line number Diff line number Diff line change
1
+ #![ feature( explicit_tail_calls) ]
2
+ #![ feature( generators) ]
3
+
4
+ fn main ( ) {
5
+ let _generator = || {
6
+ yield 1 ;
7
+ become f( ) //~ error: mismatched function ABIs
8
+ } ;
9
+ }
10
+
11
+ fn f ( ) { }
Original file line number Diff line number Diff line change
1
+ error: mismatched function ABIs
2
+ --> $DIR/out-of-generators.rs:7:9
3
+ |
4
+ LL | become f()
5
+ | ^^^^^^^^^^
6
+ |
7
+ = note: `become` requires caller and callee to have the same ABI
8
+ = note: caller ABI is `"rust-call"`, while callee ABI is `"Rust"`
9
+
10
+ error: aborting due to previous error
11
+
You can’t perform that action at this time.
0 commit comments