rust/tests
Matthias Krüger 076c047fe1
Rollup merge of #135314 - compiler-errors:eagerly-mono-closures, r=wesleywiser
Eagerly collect mono items for non-generic closures

This allows users to use `-Zprint-mono-items=eager` to eagerly monomorphize closures and coroutine bodies, in case they want to inspect the LLVM or ASM for those items.

`-Zprint-mono-items`, which used to be called `-Zprint-trans-items`, was originally added in https://github.com/rust-lang/rust/pull/30900:

> Eager mode is meant to be used in conjunction with incremental compilation
> where a stable set of translation items is more important than a minimal
> one. Thus, eager mode will instantiate drop-glue for every drop-able type
> in the crate, even of no drop call for that type exists (yet). It will
> also instantiate default implementations of trait methods, something that
> otherwise is only done on demand.

Although it remains an unstable option, its purpose has somewhat expanded since then, and as far as I can tell it's generally useful for cases when you want to monomorphize as many items as possible, even if they're unreachable. Specifically, it's useful for debugging since you can look at the codegen'd body of a function, since we don't emit items that are not reachable in monomorphization.

And even more specifically, it would be very to monomorphize the coroutine body of an async fn, since those you can't easily call those without a runtime. This PR enables this usecase since we now monomorphize `DefKind::Closure`.
2025-01-11 18:13:47 +01:00
..
assembly Add new {x86_64,i686}-win7-windows-gnu targets 2025-01-06 15:32:17 +01:00
auxiliary tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore 2024-12-18 02:59:07 +09:00
codegen Rollup merge of #134030 - folkertdev:min-fn-align, r=workingjubilee 2025-01-11 18:13:45 +01:00
codegen-units Eagerly collect mono items for non-generic closures 2025-01-10 01:27:13 +00:00
coverage add comment to test 2025-01-09 13:55:50 +01:00
coverage-run-rustdoc coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
crashes Always take the Ok path in lit_to_const and produce error constants instead 2025-01-09 08:48:00 +00:00
debuginfo Update a bunch of library types for MCP807 2025-01-09 23:47:11 -08:00
incremental Add more info on type/trait mismatches for different crate versions 2024-12-07 18:18:08 +00:00
mir-opt Auto merge of #135274 - saethlin:array-repeats, r=compiler-errors 2025-01-11 06:33:55 +00:00
pretty Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
run-make Replace the random substring of a linker argument with a placeholder and nullify the timestamp field of XCOFF files for file comparison. 2025-01-06 16:59:46 -05:00
rustdoc Rollup merge of #135171 - notriddle:notriddle/stable-path-is-better, r=GuillaumeGomez 2025-01-07 21:39:41 +01:00
rustdoc-gui Add GUI test for item info elements color 2024-12-28 20:54:00 +01:00
rustdoc-js Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez 2024-12-16 20:00:20 +01:00
rustdoc-js-std rustdoc: treat allowed_through_unstable_modules as deprecation 2025-01-02 12:03:24 -07:00
rustdoc-json Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
rustdoc-ui Try to write the panic message with a single write_all call 2025-01-01 15:58:29 +01:00
ui Rollup merge of #134776 - estebank:vanilla-ice, r=lcnr 2025-01-11 18:13:46 +01:00
ui-fulldeps Rollup merge of #134834 - dtolnay:unnamedcall, r=compiler-errors 2024-12-27 18:43:05 -08:00
COMPILER_TESTS.md