bors
c0bb3b98bb
Auto merge of #143290 - azhogin:azhogin/link-pub-async-impls, r=oli-obk
...
pub async fn impl is monomorphized when func itself is monomorphized
Implentation coroutine (`func::{closure#0}`) is monomorphized, when func itself is monomorphized.
Currently, when `pub async fn foo(..)` is exported from lib and used in several dependent crates, only 'header' function is monomorphized in the defining crate. 'header' function, returning coroutine object, is monomorphized, but the coroutine's poll function (which actually implements all the logic for the function) is not. In such situation, `func::{closure#0}` will be monomorphized in every dependency.
This PR adds monomorphization for `func::{closure#0}` (coroutine poll function), when func itself is monomorphized.
Simple test with one lib async function and ten dependent crates (executable) that use the function, shows 5-7% compilation time improvement (single-threaded).
2025-09-01 10:54:40 +00:00
..
2025-05-06 20:42:25 +10:00
2025-07-29 11:36:43 +10:00
2025-08-04 13:48:40 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-11-08 20:43:08 +11:00
2024-06-19 13:54:55 +01:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-04-01 13:07:33 +11:00
2025-04-01 13:07:33 +11:00
2025-05-06 20:42:25 +10:00
2025-01-16 22:07:18 +11:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2025-04-01 13:13:20 +11:00
2024-12-23 12:30:37 +11:00
2025-07-30 13:17:05 +10:00
2025-05-06 20:42:25 +10:00
2024-12-13 00:04:56 +00:00
2025-09-01 13:45:00 +07:00
2025-09-01 13:45:00 +07:00
2025-09-01 13:45:00 +07:00
2025-07-29 19:56:31 +10:00
2025-07-29 19:56:31 +10:00
2025-07-29 19:55:54 +10:00
2025-07-29 19:55:54 +10:00
2025-07-29 19:56:31 +10:00
2025-07-29 19:56:31 +10:00
2025-07-29 19:55:54 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-01-16 15:56:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2025-08-24 20:29:34 +10:00
2025-08-24 20:29:34 +10:00
2024-02-22 16:04:04 +00:00
2024-10-08 22:51:53 +11:00
2024-10-08 22:51:53 +11:00
2025-05-06 20:42:25 +10:00
2024-11-08 20:43:08 +11:00
2024-01-16 16:14:27 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-05-29 14:34:17 +10:00
2024-05-29 14:34:17 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-19 22:03:43 +11:00
2024-12-19 22:03:43 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2025-01-09 13:55:50 +01:00
2025-01-09 13:55:50 +01:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-02-19 13:56:20 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-01-16 15:56:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-01-16 15:56:37 +11:00
2024-10-08 22:51:53 +11:00
2024-10-08 22:51:53 +11:00
2025-05-06 20:42:25 +10:00
2024-10-08 22:51:53 +11:00
2024-11-02 23:20:14 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-05-29 14:34:11 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-05-29 14:34:11 +10:00
2025-05-06 20:42:25 +10:00
2024-01-22 12:18:57 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-01-16 15:56:37 +11:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-01-16 15:56:37 +11:00
2025-05-06 20:42:25 +10:00
2024-06-12 22:59:24 +10:00
2024-06-12 22:48:11 +10:00
2025-05-06 20:42:25 +10:00
2025-08-24 20:29:34 +10:00
2024-12-23 12:30:37 +11:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-11-24 21:12:40 +11:00
2024-11-24 21:12:40 +11:00
2025-05-06 20:42:25 +10:00
2025-01-16 22:07:18 +11:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-01-16 22:07:18 +11:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-05-29 14:34:17 +10:00
2025-08-24 20:29:34 +10:00
2025-08-24 20:29:34 +10:00
2025-08-24 20:29:34 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-01-16 15:56:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-01-16 15:56:37 +11:00
2025-05-06 20:42:25 +10:00
2024-11-08 20:43:08 +11:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-05-29 14:34:11 +10:00
2025-07-30 13:17:05 +10:00
2025-07-29 11:36:43 +10:00
2025-07-30 13:17:05 +10:00
2025-07-29 11:36:43 +10:00
2025-07-30 13:17:05 +10:00
2025-07-29 11:36:43 +10:00
2025-07-29 11:36:43 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2024-12-23 12:30:37 +11:00
2024-12-23 12:30:37 +11:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2024-02-22 16:04:04 +00:00
2024-02-22 16:04:04 +00:00
2025-05-06 20:42:25 +10:00
2024-01-16 16:14:27 +11:00
2024-01-16 16:14:27 +11:00
2025-05-06 20:42:25 +10:00
2024-05-29 14:34:17 +10:00
2024-05-29 14:34:17 +10:00