rust/compiler/rustc_middle/src
bors 7d49ae9731 Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors
Remove InstanceKind::generates_cgu_internal_copy

This PR should not contain any behavior changes. Before this PR, the logic for selecting instantiation mode is spread across all of
* `instantiation_mode`
* `cross_crate_inlinable`
* `generates_cgu_internal_copy`
* `requires_inline`

The last two of those functions are not well-designed. The function that actually decides if we generate a CGU-internal copy is `instantiation_mode`, _not_ `generates_cgu_internal_copy`. The function `requires_inline` documents that it is about the LLVM `inline` attribute and that it is a hint. The LLVM attribute is called `inlinehint`, this function is also used by other codegen backends, and since it is part of instantiation mode selection it is *not* a hint.

The goal of this PR is to start cleaning up the logic into a sequence of checks that have a more logical flow and are easier to customize in the future (to do things like improve incrementality or improve optimizations without causing obscure linker errors because you forgot to update another part of the compiler).
2025-03-25 06:36:41 +00:00
..
dep_graph Pass in dep kind names to the duplicate dep node check 2025-03-19 20:12:37 +01:00
hir Rollup merge of #138750 - oli-obk:decouple-hir-queries, r=fee1-dead 2025-03-22 11:59:19 +01:00
hooks Pretty print pattern type values with transmute if they don't satisfy their pattern 2025-02-05 14:56:41 +00:00
infer Clean up trivial traversal/lift impl generator macro calls. 2025-02-06 13:31:43 +11:00
middle Mark #[rustc_std_internal_symbol] as extern indicator 2025-03-17 14:06:56 +00:00
mir Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors 2025-03-25 06:36:41 +00:00
query Rollup merge of #138685 - nnethercote:use-Option-Ident-for-lowered-param-names, r=compiler-errors 2025-03-20 15:36:17 +01:00
thir Extract for_each_immediate_subpat from THIR pattern visitors 2025-03-18 15:55:47 +11:00
traits Fold visit into ty 2025-03-15 06:34:36 +00:00
ty Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errors 2025-03-25 06:36:41 +00:00
util Simplify intra-crate qualifiers. 2025-02-11 14:59:13 +11:00
arena.rs intern valtrees 2025-02-13 00:38:17 +01:00
error.rs Teach structured errors to display short Ty 2025-02-25 16:56:03 +00:00
lib.rs Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgr 2025-03-12 17:27:43 +00:00
lint.rs Move methods from Map to TyCtxt, part 3. 2025-02-21 14:31:09 +11:00
macros.rs Fold visit into ty 2025-03-15 06:34:36 +00:00
metadata.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs match lowering cleanup: non_scalar_compare is only for &str 2025-03-21 20:14:40 -07:00
values.rs Move some Map methods onto TyCtxt. 2025-02-17 13:21:02 +11:00