rust/tests/ui/inference
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 Arbitrary self types v2: pointers feature gate. 2024-08-27 17:32:35 +00:00
need_type_info only accept adt type during infer source visitor 2024-07-29 22:29:34 +08:00
ambiguous_type_parameter.rs
ambiguous_type_parameter.stderr
array-len-mismatch.rs
array-len-mismatch.stderr
cannot-infer-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
cannot-infer-async.stderr
cannot-infer-closure-circular.rs Use fn ptr signature instead of {closure@..} in infer error 2024-04-10 00:41:27 +00:00
cannot-infer-closure-circular.stderr Use fn ptr signature instead of {closure@..} in infer error 2024-04-10 00:41:27 +00:00
cannot-infer-closure.rs
cannot-infer-closure.stderr
cannot-infer-partial-try-return.rs
cannot-infer-partial-try-return.stderr
char-as-str-multi.rs
char-as-str-multi.stderr
char-as-str-single.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
char-as-str-single.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
char-as-str-single.stderr
deref-suggestion.rs
deref-suggestion.stderr
detect-old-time-version-format_description-parse.rs Make the "detect-old-time" UI test more representative 2024-08-29 13:58:43 -07:00
detect-old-time-version-format_description-parse.stderr Make the "detect-old-time" UI test more representative 2024-08-29 13:58:43 -07:00
dont-collect-stmts-from-parent-body.rs Don't proceed into parent bodies when collecting stmts for possible return suggestion 2024-04-16 15:56:48 -04:00
dont-collect-stmts-from-parent-body.stderr Don't proceed into parent bodies when collecting stmts for possible return suggestion 2024-04-16 15:56:48 -04:00
erase-type-params-in-label.rs
erase-type-params-in-label.stderr Use fn ptr signature instead of {closure@..} in infer error 2024-04-10 00:41:27 +00:00
hint-closure-signature-119266.rs Print note with closure signature on type mismatch 2024-04-20 15:48:27 +02:00
hint-closure-signature-119266.stderr Print note with closure signature on type mismatch 2024-04-20 15:48:27 +02:00
ice-cannot-relate-region-109178.rs Split part of adt_const_params into unsized_const_params 2024-07-17 11:01:29 +01:00
ice-cannot-relate-region-109178.stderr add test for ice "cannot relate region: LUB(ReErased, ReError)" 2024-03-21 22:02:32 +01:00
ice-ifer-var-leaked-out-of-rollback-122098.rs add test for https://github.com/rust-lang/rust/issues/122098 ICE: index out of bounds, snapshot_vec.rs 2024-03-21 20:57:54 +01:00
ice-ifer-var-leaked-out-of-rollback-122098.stderr Use verbose style for argument removal suggestion 2024-07-05 19:40:09 +00:00
infer-binary-operand-behind-reference.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
infer-fn-tail-expr.rs Move 100 entries from tests/ui into subdirs 2024-05-20 19:55:59 -07:00
inference_unstable_featured.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
inference_unstable_featured.stderr
inference_unstable_forced.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
inference_unstable_forced.stderr
inference_unstable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
inference_unstable.stderr Provide structured suggestion for #![feature(foo)] 2024-03-18 16:08:58 +00:00
inference-variable-behind-raw-pointer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
inference-variable-behind-raw-pointer.stderr
issue-3743.rs Move tests 2024-03-03 16:30:48 -03:00
issue-12028.rs Move tests 2024-02-13 18:08:25 -03:00
issue-12028.stderr Move tests 2024-02-13 18:08:25 -03:00
issue-28935.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-36053.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-70082.rs
issue-70082.stderr
issue-70703.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71309.rs
issue-71309.stderr
issue-71584.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-71584.stderr
issue-71732.rs
issue-71732.stderr
issue-72616.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-72616.stderr
issue-72690.rs
issue-72690.stderr Use fn ptr signature instead of {closure@..} in infer error 2024-04-10 00:41:27 +00:00
issue-80409.compat.stderr Check closure args and returns are WF 2024-04-25 10:03:17 -04:00
issue-80409.no-compat.stderr Check closure args and returns are WF 2024-04-25 10:03:17 -04:00
issue-80409.rs Check closure args and returns are WF 2024-04-25 10:03:17 -04:00
issue-80816.rs
issue-80816.stderr
issue-81522.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-83606.rs Partially implement ConstArgHasType 2024-05-29 17:06:54 +01:00
issue-83606.stderr Const generic parameters aren't bounds, even if we end up erroring because of the bound that binds the parameter's type 2024-06-19 14:58:29 +00:00
issue-86094-suggest-add-return-to-coerce-ret-ty.rs
issue-86094-suggest-add-return-to-coerce-ret-ty.stderr
issue-86162-1.rs
issue-86162-1.stderr
issue-86162-2.rs
issue-86162-2.stderr
issue-103587.rs
issue-103587.stderr
issue-104649.rs
issue-104649.stderr Use fn ptr signature instead of {closure@..} in infer error 2024-04-10 00:41:27 +00:00
issue-107090.rs make type_flags(ReError) & HAS_ERROR 2024-03-20 17:29:58 +00:00
issue-107090.stderr make type_flags(ReError) & HAS_ERROR 2024-03-20 17:29:58 +00:00
issue-113354.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-113354.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-113354.stderr
lambda-infer-unresolved.rs Move 100 entries from tests/ui into subdirs 2024-05-20 19:55:59 -07:00
lub-glb-with-unbound-infer-var.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
multiple-impl-apply.rs
multiple-impl-apply.stderr
newlambdas-ret-infer2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
newlambdas-ret-infer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
note-and-explain-ReVar-124973.rs Handle ReVar in note_and_explain_region. 2024-05-23 12:16:49 +10:00
note-and-explain-ReVar-124973.stderr Handle ReVar in note_and_explain_region. 2024-05-23 12:16:49 +10:00
order-dependent-cast-inference.rs Move 100 entries from tests/ui into subdirs 2024-05-20 19:55:59 -07:00
order-dependent-cast-inference.stderr Move 100 entries from tests/ui into subdirs 2024-05-20 19:55:59 -07:00
question-mark-type-infer.rs
question-mark-type-infer.stderr
range-type-infer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
simple-infer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
stmts-as-exp-105431.rs renaming test cases 2024-02-29 08:46:00 +08:00
stmts-as-exp-105431.stderr renaming test cases 2024-02-29 08:46:00 +08:00
str-as-char-butchered.rs Don't suggest turning non-char-literal exprs of ty char into string literals 2024-05-28 09:40:02 +02:00
str-as-char-butchered.stderr Don't suggest turning non-char-literal exprs of ty char into string literals 2024-05-28 09:40:02 +02:00
str-as-char-non-lit.rs Don't suggest turning non-char-literal exprs of ty char into string literals 2024-05-28 09:40:02 +02:00
str-as-char-non-lit.stderr Don't suggest turning non-char-literal exprs of ty char into string literals 2024-05-28 09:40:02 +02:00
str-as-char.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
str-as-char.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
str-as-char.stderr review comment: str -> string in messages 2024-03-17 23:35:18 +00:00
tutorial-suffix-inference-test.rs
tutorial-suffix-inference-test.stderr
type-infer-generalize-ty-var.rs Ignore tests w/ current/next revisions from compare-mode=next-solver 2024-03-10 21:18:41 -04:00
untyped-primitives.rs Remove From impls for unstable types that break inference 2024-04-11 18:04:31 -04:00