rust/compiler/rustc_middle/src
bors 2d5a628a1d Auto merge of #128165 - saethlin:optimize-clone-shims, r=compiler-errors
Let InstCombine remove Clone shims inside Clone shims

The Clone shims that we generate tend to recurse into other Clone shims, which gets very silly very quickly. Here's our current state: https://godbolt.org/z/E69YeY8eq

So I've added InstSimplify to the shims optimization passes, and improved `is_trivially_pure_clone_copy` so that it can delete those calls inside the shim. This makes the shim way smaller because most of its size is the required ceremony for unwinding.

This change also completely breaks the UI test added for https://github.com/rust-lang/rust/issues/104870. With this PR, that program ICEs in MIR type checking because `is_trivially_pure_clone_copy` and the trait solver disagree on whether `*mut u8` is `Copy`. And adding the requisite `Copy` impl to make them agree makes the test not generate any diagnostics. Considering that I spent most of my time on this PR fixing `#![no_core]` tests, I would prefer to just delete this one. The maintenance burden of `#![no_core]` is uniquely high because when they break they tend to break in very confusing ways.

try-job: x86_64-mingw
2024-07-26 13:13:04 +00:00
..
dep_graph local_def_path_hash_to_def_id can fail 2024-06-19 07:45:47 -04:00
hir Add ConstArgKind::Path and make ConstArg its own HIR node 2024-07-16 19:27:28 -07:00
hooks Introduce and provide a hook for should_codegen_locally 2024-07-15 19:54:47 +00:00
infer Simplify IntVarValue/FloatVarValue 2024-06-01 10:31:32 -04:00
middle Avoid ref when using format! in compiler 2024-07-19 14:52:07 -04:00
mir Auto merge of #127042 - GrigorenkoPV:derivative, r=compiler-errors 2024-07-25 22:50:58 +00:00
query Auto merge of #127658 - compiler-errors:precise-capturing-rustdoc-cross, r=fmease 2024-07-20 11:03:35 +00:00
thir Track mutability of deref patterns 2024-04-20 15:59:54 +02:00
traits enable fuzzing of SearchGraph 2024-07-12 06:30:19 -04:00
ty Auto merge of #128165 - saethlin:optimize-clone-shims, r=compiler-errors 2024-07-26 13:13:04 +00:00
util Avoid ref when using format! in compiler 2024-07-19 14:52:07 -04:00
arena.rs Uplift PredefinedOpaquesData 2024-06-18 10:40:30 -04:00
error.rs Re-implement a type-size based limit 2024-07-02 15:48:48 -04:00
lib.rs Rollup merge of #125505 - aDotInTheVoid:middle-idl, r=pnkfelix 2024-06-05 18:21:09 +02:00
lint.rs Auto merge of #125410 - fmease:adj-lint-diag-api, r=nnethercote 2024-05-27 08:44:12 +00:00
macros.rs lift_to_tcx -> lift_to_interner 2024-07-17 10:46:10 -04:00
metadata.rs Remove extern crate rustc_macros from rustc_middle. 2024-04-29 11:19:16 +10:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs pattern lowering: make sure we never call user-defined PartialEq instances 2024-07-18 11:58:16 +02:00
values.rs Use Variance glob import everywhere 2024-06-12 16:25:45 -04:00