rust/compiler/rustc_middle/src
bors 915e7eb9b9 Auto merge of #132961 - adetaylor:arbitrary-self-types-the-big-bit, r=compiler-errors,wesleywiser
Arbitrary self types v2: main compiler changes

This is the main PR in a series of PRs related to Arbitrary Self Types v2, tracked in #44874. Specifically this is step 7 of the plan [described here](https://github.com/rust-lang/rust/issues/44874#issuecomment-2122179688), for [RFC 3519](https://github.com/rust-lang/rfcs/pull/3519).

Overall this PR:
* Switches from the `Deref` trait to the new `Receiver` trait when the unstable `arbitrary_self_types` feature is enabled (the simple bit)
* Introduces new algorithms to spot "shadowing"; that is, the case where a newly-added method in an outer smart pointer might end up overriding a pre-existing method in the pointee (the complex bit). Most of this bit was explored in [this earlier perf-testing PR](https://github.com/rust-lang/rust/pull/127812#issuecomment-2236911900).
* Lots of tests

This should not break compatibility for:
* Stable users, where it should have no effect
* Users of the existing `arbitrary_self_types` feature (because we implement `Receiver` for `T: Deref`) _unless_ those folks have added methods which may shadow methods in inner types, which we no longer want to allow

Subsequent PRs will add better diagnostics.

It's probably easiest to review this commit-by-commit.

r? `@wesleywiser`
2024-12-12 21:40:39 +00:00
..
dep_graph Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir Remove hir::ArrayLen, introduce ConstArgKind::Infer 2024-11-30 21:00:31 +01:00
hooks Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
infer Remove associated type based effects logic 2024-10-24 09:46:36 +00:00
middle Pretty print AsyncFn traits too 2024-11-22 16:55:28 +00:00
mir Auto merge of #128004 - folkertdev:naked-fn-asm, r=Amanieu 2024-12-11 21:51:07 +00:00
query Rollup merge of #134029 - Zalathar:zero, r=oli-obk 2024-12-10 08:55:59 +01:00
thir Introduce default_field_values feature 2024-12-09 21:55:01 +00:00
traits Arbitrary self types v2: use Receiver trait 2024-12-11 11:59:12 +00:00
ty Rollup merge of #133122 - compiler-errors:afidt, r=oli-obk 2024-12-12 19:00:41 +01:00
util Get rid of HIR const checker 2024-11-22 02:32:26 +00:00
arena.rs compiler: Directly use rustc_abi in metadata and middle 2024-11-03 13:38:47 -08:00
error.rs Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
lib.rs move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
lint.rs lints_that_dont_need_to_run: never skip future-compat-reported lints 2024-11-19 22:04:10 +01:00
macros.rs Improve const traits diagnostics for new desugaring 2024-10-02 19:45:17 +08:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +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 Introduce default_field_values feature 2024-12-09 21:55:01 +00:00
values.rs compiler: Directly use rustc_abi in metadata and middle 2024-11-03 13:38:47 -08:00