rust/tests/ui/self
Matthias Krüger 08187c32c7
Rollup merge of #129664 - adetaylor:arbitrary-self-types-pointers-feature-gate, r=wesleywiser
Arbitrary self types v2: pointers feature gate.

The main `arbitrary_self_types` feature gate will shortly be reused for a new version of arbitrary self types which we are amending per [this RFC](https://github.com/rust-lang/rfcs/blob/master/text/3519-arbitrary-self-types-v2.md). The main amendments are:

* _do_ support `self` types which can't safely implement `Deref`
* do _not_ support generic `self` types
* do _not_ support raw pointers as `self` types.

This PR relates to the last of those bullet points: this strips pointer support from the current `arbitrary_self_types` feature. We expect this to cause some amount of breakage for crates using this unstable feature to allow raw pointer self types. If that's the case, we want to know about it, and we want crate authors to know of the upcoming changes.

For now, this can be resolved by adding the new
`arbitrary_self_types_pointers` feature to such crates. If we determine that use of raw pointers as self types is common, then we may maintain that as an unstable feature even if we come to stabilize the rest of the `arbitrary_self_types` support in future. If we don't hear that this PR is causing breakage, then perhaps we don't need it at all, even behind an unstable feature gate.

[Tracking issue](https://github.com/rust-lang/rust/issues/44874)

This is [step 4 of the plan outlined here](https://github.com/rust-lang/rust/issues/44874#issuecomment-2122179688)
2024-09-05 03:47:42 +02:00
..
auxiliary
elision elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
arbitrary_self_type_mut_difference.rs Detect method not found on arbitrary self type with different mutability 2023-08-04 16:05:59 +00:00
arbitrary_self_type_mut_difference.stderr Deduplicate some logic and reword output 2024-02-22 18:05:28 +00:00
arbitrary_self_types_needing_box_or_arc_wrapping.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_needing_box_or_arc_wrapping.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_needing_box_or_arc_wrapping.stderr Add tests for #57994 2023-08-04 16:19:55 +00:00
arbitrary_self_types_needing_mut_pin.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_needing_mut_pin.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_needing_mut_pin.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
arbitrary_self_types_nested.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_pin_lifetime_impl_trait-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_pin_lifetime_impl_trait-async.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
arbitrary_self_types_pin_lifetime_impl_trait.rs
arbitrary_self_types_pin_lifetime_impl_trait.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
arbitrary_self_types_pin_lifetime_mismatch-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_pin_lifetime_mismatch-async.stderr Detect when a lifetime is being reused in suggestion 2024-05-17 21:23:47 +00:00
arbitrary_self_types_pin_lifetime_mismatch.rs Run rustfmt on modified tests 2024-05-17 20:31:13 +00:00
arbitrary_self_types_pin_lifetime_mismatch.stderr Detect when a lifetime is being reused in suggestion 2024-05-17 21:23:47 +00:00
arbitrary_self_types_pin_lifetime-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_pin_lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_pin_needing_borrow.rs Add tests for #57994 2023-08-04 16:19:55 +00:00
arbitrary_self_types_pin_needing_borrow.stderr update ui tests 2024-01-07 08:56:20 -08:00
arbitrary_self_types_pointers_and_wrappers.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_raw_pointer_struct.rs Arbitrary self types v2: pointers feature gate. 2024-08-27 17:32:35 +00:00
arbitrary_self_types_raw_pointer_trait.rs Arbitrary self types v2: pointers feature gate. 2024-08-27 17:32:35 +00:00
arbitrary_self_types_silly.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_stdlib_pointers.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary_self_types_unsized_struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary-self-from-method-substs-ice.rs Avoid an ICE reachable through const eval shenanigans 2024-07-01 10:14:42 +00:00
arbitrary-self-from-method-substs-ice.stderr Avoid an ICE reachable through const eval shenanigans 2024-07-01 10:14:42 +00:00
arbitrary-self-from-method-substs.default.stderr Avoid an ICE reachable through const eval shenanigans 2024-07-01 10:14:42 +00:00
arbitrary-self-from-method-substs.feature.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
arbitrary-self-from-method-substs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
arbitrary-self-opaque.rs Require any function with a tait in its signature to actually constrain a hidden type 2024-06-12 08:53:59 +00:00
arbitrary-self-opaque.stderr Require any function with a tait in its signature to actually constrain a hidden type 2024-06-12 08:53:59 +00:00
arbitrary-self-types-not-object-safe.curr.stderr On object safety error, mention new enum as alternative 2023-10-29 23:55:46 +00:00
arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
arbitrary-self-types-not-object-safe.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
builtin-superkinds-self-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
by-value-self-in-mut-slot.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
class-missing-self.rs
class-missing-self.stderr When suggesting self.x for S { x }, use S { x: self.x } 2023-09-25 15:56:36 +00:00
explicit_self_xcrate_exe.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
explicit-self-closures.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
explicit-self-generic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
explicit-self-objects-uniq.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
explicit-self.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-61882-2.rs
issue-61882-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-61882.rs
issue-61882.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
move-self.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
object-safety-sized-self-by-value-self.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
object-safety-sized-self-generic-method.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
object-safety-sized-self-return-Self.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
objects-owned-object-owned-method.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
point-at-arbitrary-self-type-method.rs
point-at-arbitrary-self-type-method.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
point-at-arbitrary-self-type-trait-method.rs
point-at-arbitrary-self-type-trait-method.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
self_lifetime-async.rs elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
self_lifetime-async.stderr elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
self_lifetime.rs elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
self_lifetime.stderr elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
self_type_keyword-2.rs
self_type_keyword-2.stderr
self_type_keyword.rs Avoid a track_errors by bubbling up most errors from check_well_formed 2023-10-20 08:46:27 +00:00
self_type_keyword.stderr Deny keyword lifetimes pre-expansion 2024-07-16 12:06:25 -04:00
self-ctor-nongeneric.rs Warn/error on self ctor from outer item in inner item 2024-05-18 13:08:34 -04:00
self-ctor-nongeneric.stderr Warn/error on self ctor from outer item in inner item 2024-05-18 13:08:34 -04:00
self-ctor.rs Warn/error on self ctor from outer item in inner item 2024-05-18 13:08:34 -04:00
self-ctor.stderr Warn/error on self ctor from outer item in inner item 2024-05-18 13:08:34 -04:00
self-impl-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-impl.rs
self-impl.stderr Unify suggestion wording 2023-10-17 17:33:55 +00:00
self-in-mut-slot-default-method.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-in-mut-slot-immediate-value.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-in-typedefs.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-infer.rs
self-infer.stderr
self-re-assign.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-shadowing-import.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-type-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
self-vs-path-ambiguity.rs
self-vs-path-ambiguity.stderr Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
string-self-append.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-self-2.rs
suggest-self-2.stderr
suggest-self.rs
suggest-self.stderr
ufcs-explicit-self.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
uniq-self-in-mut-slot.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
where-for-self.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00