rust/tests/ui/transmute
Bryan Garza 8f1cec8d84 Safe Transmute: Enable handling references, including recursive types
This patch enables support for references in Safe Transmute, by generating
nested obligations during trait selection. Specifically, when we call
`confirm_transmutability_candidate(...)`, we now recursively traverse the
`rustc_transmute::Answer` tree and create obligations for all the `Answer`
variants, some of which include multiple nested `Answer`s.

Also, to handle recursive types, enable support for coinduction for the Safe
Transmute trait (`BikeshedIntrinsicFrom`) by adding the `#[rustc_coinduction]`
annotation.

Also fix some small logic issues when reducing the `or` and `and` combinations
in `rustc_transmute`, so that we don't end up with additional redundant
`Answer`s in the tree.

Co-authored-by: Jack Wrenn <jack@wrenn.fyi>
2023-05-24 14:52:18 -07:00
..
lifetimes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
main.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
main.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-different-sizes.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-different-sizes.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-fat-pointers.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-fat-pointers.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-from-fn-item-types-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-from-fn-item-types-error.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-impl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-imut-to-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-imut-to-mut.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-padding-ice.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-padding-ice.stderr Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
transmute-type-parameters.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
transmute-type-parameters.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00