rust/tests/ui/transmutability/references
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
..
recursive-wrapper-types-bit-compatible.rs Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
recursive-wrapper-types-bit-compatible.stderr Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
recursive-wrapper-types-bit-incompatible.rs Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
recursive-wrapper-types-bit-incompatible.stderr Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
recursive-wrapper-types.rs Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
u8-to-unit.rs Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
u8-to-unit.stderr Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
unit-to-itself.rs Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
unit-to-u8.rs Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
unit-to-u8.stderr Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00