rust/compiler/rustc_middle/src
bors 7d7de5bf3c Auto merge of #139088 - spastorino:ergonomic-ref-counting-2, r=nikomatsakis
Ergonomic ref counting: optimize away clones when possible

This PR build on top of https://github.com/rust-lang/rust/pull/134797. It optimizes codegen of ergonomic ref-counting when the type being `use`d is only known to be copy after monomorphization. We avoid codening a clone and generate bitwise copy instead.

RFC: https://github.com/rust-lang/rfcs/pull/3680
Tracking issue: https://github.com/rust-lang/rust/issues/132290
Project goal: https://github.com/rust-lang/rust-project-goals/issues/107

r? `@nikomatsakis`

This PR could better sit on top of https://github.com/rust-lang/rust/pull/131650 but as it did not land yet I've decided to just do minimal changes. It may be the case that doing what I'm doing regress the performance and we may need to go the full route of https://github.com/rust-lang/rust/pull/131650.
cc `@saethlin` in this regard.
2025-04-10 09:08:23 +00:00
..
dep_graph Add a dep kind for use of the anon node with zero dependencies 2025-04-02 07:35:05 +02:00
hir Rollup merge of #139232 - nnethercote:remove-Map-5, r=Zalathar 2025-04-02 22:52:46 +09: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 Make LevelAndSource a struct 2025-04-03 09:17:55 +00:00
mir Auto merge of #139088 - spastorino:ergonomic-ref-counting-2, r=nikomatsakis 2025-04-10 09:08:23 +00:00
query Auto merge of #139000 - compiler-errors:rigid-missing-item, r=lcnr 2025-04-10 04:03:59 +00:00
thir Add {ast,hir,thir}::PatKind::Missing variants. 2025-03-28 09:18:57 +11:00
traits Rollup merge of #138176 - compiler-errors:rigid-sized-obl, r=lcnr 2025-03-31 14:36:20 +02:00
ty Use a query rather than recomputing the tail repeatedly 2025-04-09 20:26:58 +00:00
util Remove attribute #[rustc_error] 2025-03-30 01:32:21 +03:00
arena.rs borrowck typeck children together with their parent 2025-04-08 00:34:40 +02: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 Remove LintExpectationId from Level variants 2025-04-03 09:22:21 +00: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 Rollup merge of #139108 - Nadrieril:simplify-expandedconstant, r=oli-obk 2025-04-07 22:29:18 +10:00
values.rs Avoiding calling queries when collecting active queries 2025-03-26 09:36:36 +01:00