rust/tests/ui/cast
Adrian Taylor e77eb042ce 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-08-27 17:32:35 +00:00
..
cast-as-bool.rs Migrate 'cast to bool' diagnostic 2023-09-18 14:03:57 +00:00
cast-as-bool.stderr Migrate 'cast to bool' diagnostic 2023-09-18 14:03:57 +00:00
cast-char.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-char.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-does-fallback.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
cast-errors-issue-43825.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-errors-issue-43825.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cast-from-nil.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
cast-from-nil.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cast-int-to-char.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-int-to-char.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-macro-lhs.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-macro-lhs.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cast-pointee-projection.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
cast-region-to-uint.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
cast-rfc0401-2.rs add source type for invalid bool casts 2023-09-11 18:10:07 +00:00
cast-rfc0401-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cast-rfc0401-vtable-kinds.rs blessings 2024-07-04 17:56:09 +02:00
cast-rfc0401-vtable-kinds.stderr blessings 2024-07-04 17:56:09 +02:00
cast-rfc0401.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
cast-to-bare-fn.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-to-bare-fn.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-to-infer-ty.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
cast-to-nil.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
cast-to-nil.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
cast-to-slice.rs fix: diagnostic for casting reference to slice 2023-12-20 20:50:32 -05:00
cast-to-slice.stderr Update existing tests 2023-12-20 22:53:56 -05:00
cast-to-unsized-trait-object-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast-to-unsized-trait-object-suggestion.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cast.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
casts-differing-anon.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
casts-differing-anon.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
casts-issue-46365.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
casts-issue-46365.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
codegen-object-shim.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
dyn-tails-need-normalization.rs Normalize when equating dyn tails in MIR borrowck 2024-08-05 14:28:06 -04:00
enum-to-numeric-cast.rs Emit more specific diagnostics when enums fail to cast with `as` 2024-02-09 09:19:44 +05:30
enum-to-numeric-cast.stderr Emit more specific diagnostics when enums fail to cast with `as` 2024-02-09 09:19:44 +05:30
fat-ptr-cast-rpass.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
fat-ptr-cast-rpass.stderr Update tests 2024-02-07 10:42:01 +08:00
fat-ptr-cast.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fat-ptr-cast.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ice-cast-type-with-error-124848.rs FIx ICE while casting a type with error 2024-05-11 08:24:26 +05:30
ice-cast-type-with-error-124848.stderr Use ordinal number in argument error 2024-07-14 13:50:09 +09:00
issue-10991.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-10991.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-17444.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-17444.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-84213.fixed [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-84213.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-84213.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85586.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-85586.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-88621.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88621.stderr Emit more specific diagnostics when enums fail to cast with `as` 2024-02-09 09:19:44 +05:30
issue-89497.fixed [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-89497.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-89497.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-106883-is-empty.rs suggest `is_empty` for collections when casting to `bool` 2023-01-15 22:17:54 +13:00
issue-106883-is-empty.stderr suggest `is_empty` for collections when casting to `bool` 2023-01-15 22:17:54 +13:00
ptr-to-ptr-different-regions.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
ptr-to-trait-obj-add-auto.rs Sort trait names before printing 2024-07-04 18:38:18 +02:00
ptr-to-trait-obj-add-auto.stderr Sort trait names before printing 2024-07-04 18:38:18 +02:00
ptr-to-trait-obj-add-super-auto.rs Allow casting `*mut dyn T`->`*mut (dyn T + Send)` if `T` has `Send` super trait 2024-07-07 20:07:01 +02:00
ptr-to-trait-obj-different-args.rs Equate types instead of using `Unsize` 2024-07-05 22:35:14 +02:00
ptr-to-trait-obj-different-args.stderr diagnostics: use `DeepRejectCtxt` for check 2024-08-13 10:01:13 -07:00
ptr-to-trait-obj-different-regions-id-trait.current.stderr Normalize struct tail properly in borrowck and hir typeck 2024-08-11 19:40:03 -04:00
ptr-to-trait-obj-different-regions-id-trait.next.stderr Normalize struct tail properly in borrowck and hir typeck 2024-08-11 19:40:03 -04:00
ptr-to-trait-obj-different-regions-id-trait.rs Normalize struct tail properly in borrowck and hir typeck 2024-08-11 19:40:03 -04:00
ptr-to-trait-obj-different-regions-lt-ext.rs Arbitrary self types v2: pointers feature gate. 2024-08-27 17:32:35 +00:00
ptr-to-trait-obj-different-regions-lt-ext.stderr Add more checks for pointers with vtable meta 2024-07-04 17:56:09 +02:00
ptr-to-trait-obj-different-regions-misc.rs test blessing 2024-07-04 17:56:09 +02:00
ptr-to-trait-obj-different-regions-misc.stderr Add more checks for pointers with vtable meta 2024-07-04 17:56:09 +02:00
ptr-to-trait-obj-ok.rs test blessing 2024-07-04 17:56:09 +02:00
ptr-to-trait-obj-wrap-upcast.rs Actually check that the traits are the same for casting pointers to dyn _ 2024-07-04 17:56:09 +02:00
ptr-to-trait-obj-wrap-upcast.stderr Actually check that the traits are the same for casting pointers to dyn _ 2024-07-04 17:56:09 +02:00
supported-cast.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
unsized-struct-cast.rs make unsized cast illegal 2023-09-22 18:57:27 +03:00
unsized-struct-cast.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unsized-union-ice.rs add test for casting pointer to union with unsized tail 2024-03-19 13:57:31 +01:00
unsized-union-ice.stderr add test for casting pointer to union with unsized tail 2024-03-19 13:57:31 +01:00
unsupported-cast.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unsupported-cast.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00