rust/compiler/rustc_hir_analysis/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
..
check Auto merge of #132961 - adetaylor:arbitrary-self-types-the-big-bit, r=compiler-errors,wesleywiser 2024-12-12 21:40:39 +00:00
coherence Make Copy unsafe to implement for ADTs with unsafe fields 2024-12-07 20:50:00 +00:00
collect Rollup merge of #134105 - compiler-errors:validate-self-preds, r=wesleywiser 2024-12-11 03:30:41 -05:00
errors Clarify implicit captures for RPITIT 2024-10-10 11:46:51 -07:00
hir_ty_lowering Rollup merge of #134158 - compiler-errors:item-def-id, r=jackh726 2024-12-11 03:30:44 -05:00
impl_wf_check Fix const specialization 2024-12-02 22:21:53 +00:00
outlives Implement const effect predicate in new solver 2024-10-24 09:46:36 +00:00
variance Add variances to RPITITs 2024-10-10 11:46:48 -07:00
autoderef.rs Arbitrary self types v2: use Receiver trait 2024-12-11 11:59:12 +00:00
bounds.rs Merge HostPolarity and BoundConstness 2024-10-30 16:23:16 +00:00
check_unused.rs Remove #[macro_use] extern crate tracing from rustc_hir_analysis. 2024-08-30 17:14:59 +10:00
collect.rs Rollup merge of #134094 - estebank:const-trait-errors, r=compiler-errors 2024-12-10 20:16:02 +01:00
constrained_generic_params.rs Remove #[macro_use] extern crate tracing from rustc_hir_analysis. 2024-08-30 17:14:59 +10:00
delegation.rs Effects cleanup 2024-10-26 10:19:07 +08:00
errors.rs Tweak wording of non-const traits used as const bounds 2024-12-10 00:38:05 +00:00
hir_wf_check.rs uplift fold_regions to rustc_type_ir 2024-11-28 10:40:58 +01:00
impl_wf_check.rs nightly feature tracking: get rid of the per-feature bool fields 2024-10-23 09:14:41 +01:00
lib.rs Rollup merge of #132047 - compiler-errors:rbv-rtn-cleanup, r=cjgillot 2024-12-01 08:15:21 +01:00