mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-08 21:28:33 +00:00

This also removes some manipulation of the function signature span that only made sense in the context of merging non-adjacent spans.
27 lines
880 B
Plaintext
27 lines
880 B
Plaintext
LL| |//@ edition: 2021
|
|
LL| |
|
|
LL| |//@ aux-build: executor.rs
|
|
LL| |extern crate executor;
|
|
LL| |
|
|
LL| 1|async fn call_once(f: impl AsyncFnOnce()) {
|
|
LL| 1| f().await;
|
|
LL| 1|}
|
|
LL| |
|
|
LL| 1|pub fn main() {
|
|
LL| 3| let async_closure = async || {};
|
|
^1
|
|
------------------
|
|
| async_closure::main::{closure#0}:
|
|
| LL| 1| let async_closure = async || {};
|
|
------------------
|
|
| async_closure::main::{closure#0}:
|
|
| LL| 1| let async_closure = async || {};
|
|
------------------
|
|
| async_closure::main::{closure#0}::{closure#0}::<i16>:
|
|
| LL| 1| let async_closure = async || {};
|
|
------------------
|
|
LL| 1| executor::block_on(async_closure());
|
|
LL| 1| executor::block_on(call_once(async_closure));
|
|
LL| 1|}
|
|
|