about summary refs log tree commit diff
path: root/tests/codegen-units/item-collection
AgeCommit message (Collapse)AuthorLines
2025-09-01pub async fn implementation coroutine (func::{closure#0}) is monomorphized, ↵Andrew Zhogin-0/+99
when func itself is monomorphized
2025-06-22Fix tests to drop now-skipped codegenMark Rousskov-11/+44
2025-06-21Skip collecting no-op DropGlue in vtablesMark Rousskov-0/+23
Since 122662 this no longer gets used in vtables, so we're safe to fully drop generating these empty functions. Those are eventually cleaned up by LLVM, but it's wasteful to produce them in the first place. This also adds a missing test for fn-ptr casts, which do still need to generate no-op drop glue. It's possible a future optimization could point all of those at the same drop glue (e.g., for *mut ()) rather than for each separate type, but that would require extra work for CFI and isn't particularly easy to do anyway.
2025-06-16tests: `{Meta,Pointee}Sized` in non-minicore testsDavid Wood-1/+7
As before, add `MetaSized` and `PointeeSized` traits to all of the non-minicore `no_core` tests so that they don't fail for lack of language items.
2025-05-09Remove mono item collection strategy override from -Zprint-mono-itemsTomasz Miąsko-50/+43
Previously `-Zprint-mono-items` would override the mono item collection strategy. When debugging one doesn't want to change the behaviour, so this was counter productive. Additionally, the produced behaviour was artificial and might never arise without using the option in the first place (`-Zprint-mono-items=eager` without `-Clink-dead-code`). Finally, the option was incorrectly marked as `UNTRACKED`. Resolve those issues, by turning `-Zprint-mono-items` into a boolean flag that prints results of mono item collection without changing the behaviour of mono item collection. For codegen-units test incorporate `-Zprint-mono-items` flag directly into compiletest tool. Test changes are mechanical. `-Zprint-mono-items=lazy` was removed without additional changes, and `-Zprint-mono-items=eager` was turned into `-Clink-dead-code`. Linking dead code disables internalization, so tests have been updated accordingly.
2025-01-27Remove -Zinline-in-all-cgus and clean up CGU partitioning testsBen Kimock-13/+6
2025-01-21remove support for the #[start] attributeRalf Jung-70/+70
2025-01-15Make sure we actually use the right trivial lifetime substs when eagerly ↵Michael Goulet-0/+13
monomorphizing drop for structs
2025-01-14Auto merge of #135496 - matthiaskrgr:rollup-ps0cjzn, r=matthiaskrgrbors-0/+6
Rollup of 7 pull requests Successful merges: - #134216 (Enable "jump to def" feature on patterns) - #134880 (Made `Path::name` only have item name rather than full name) - #135466 (Leak check in `impossible_predicates` to avoid monomorphizing impossible instances) - #135476 (Remove remnant of asmjs) - #135479 (mir borrowck: cleanup late-bound region handling) - #135493 (Fix legacy symbol mangling of closures) - #135495 (Add missing closing backtick in commit hook message 🐸) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-14Auto merge of #135313 - compiler-errors:needs-mono, r=BoxyUwUbors-0/+43
Eagerly mono drop for structs with lifetimes That is, use `!generics.requires_monomorphization()` rather than `generics.is_empty()` like the rest of the mono collector code.
2025-01-14Fix legacy symbol mangling of closuresMichael Goulet-0/+6
2025-01-10Eagerly collect mono items for non-generic closuresMichael Goulet-3/+16
2025-01-10Eagerly mono drop for structs with lifetimesMichael Goulet-0/+43
2024-12-17Use field init shorthand where possibleJosh Triplett-1/+1
Field init shorthand allows writing initializers like `tcx: tcx` as `tcx`. The compiler already uses it extensively. Fix the last few places where it isn't yet used.
2024-12-06Remove polymorphizationBen Kimock-4/+4
2024-08-10Fix and enable disabled codegen-units testsBen Kimock-30/+23
2024-08-03Revert "Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix"Michael Goulet-17/+17
This reverts commit 13314df21b0bb0cdd02c6760581d1b9f1052fa7e, reversing changes made to 6e534c73c35f569492ed5fb5f349075d58ed8b7e.
2024-07-01Avoid MIR bloat in inliningScott McMurray-0/+1
In 126578 we ended up with more binary size increases than expected. This change attempts to avoid inlining large things into small things, to avoid that kind of increase, in cases when top-down inlining will still be able to do that inlining later.
2024-06-05Detect pub structs never constructed and unused associated constants in traitsr0cky-17/+17
2024-05-31Run rustfmt on `tests/codegen-units/`.Nicholas Nethercote-99/+96
2024-03-22Codegen const panic messages as function callsMark Rousskov-3/+11
This skips emitting extra arguments at every callsite (of which there can be many). For a librustc_driver build with overflow checks enabled, this cuts 0.7MB from the resulting binary.
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-42/+42
2024-02-07Update testsr0cky-1/+8
2024-01-02Adjust compiler tests for unused_tuple_struct_fields -> dead_codeJake Goulding-8/+8
2023-10-17Automatically enable cross-crate inlining for small functionsBen Kimock-2/+8
2023-04-07Turn off inlining for codegen-unit testsBen Kimock-9/+7
2023-01-11Move /src/test to /testsAlbert Larsan-0/+1404