rust/tests/ui/ufcs
Adrian Taylor e75660dad3 Arbitrary self types v2: use Receiver trait
In this new version of Arbitrary Self Types, we no longer use the Deref trait
exclusively when working out which self types are valid. Instead, we follow a
chain of Receiver traits. This enables methods to be called on smart pointer
types which fundamentally cannot support Deref (for instance because they are
wrappers for pointers that don't follow Rust's aliasing rules).

This includes:
* Changes to tests appropriately
* New tests for:
  * The basics of the feature
  * Ensuring lifetime elision works properly
  * Generic Receivers
  * A copy of the method subst test enhanced with Receiver

This is really the heart of the 'arbitrary self types v2' feature, and
is the most critical commit in the current PR.

Subsequent commits are focused on:
* Detecting "shadowing" problems, where a smart pointer type can hide
  methods in the pointee.
* Diagnostics and cleanup.

Naming: in this commit, the "Autoderef" type is modified so that it no
longer solely focuses on the "Deref" trait, but can now consider the
"Receiver" trait instead. Should it be renamed, to something like
"TraitFollower"? This was considered, but rejected, because
* even in the Receiver case, it still considers built-in derefs
* the name Autoderef is short and snappy.
2024-12-11 11:59:12 +00:00
..
bad-builder.rs test 2024-02-20 03:01:35 +00:00
bad-builder.stderr Bless tests due to new method suggestions. 2024-09-07 21:06:49 +07:00
ufcs-explicit-self-bad.rs Continue compilation after check_mod_type_wf errors 2024-02-14 11:00:30 +00:00
ufcs-explicit-self-bad.stderr Arbitrary self types v2: use Receiver trait 2024-12-11 11:59:12 +00:00
ufcs-partially-resolved.rs Use smart-resolve when checking for trait in RHS of UFCS 2023-04-07 05:33:52 +00:00
ufcs-partially-resolved.stderr Use smart-resolve when checking for trait in RHS of UFCS 2023-04-07 05:33:52 +00:00
ufcs-polymorphic-paths.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ufcs-qpath-missing-params.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
ufcs-qpath-missing-params.stderr Revert suggestion verbosity change 2024-07-22 22:51:53 +00:00
ufcs-qpath-self-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ufcs-qpath-self-mismatch.stderr Don't call const normalize in error reporting 2024-09-22 13:55:06 -04:00