rust/tests/ui/transmutability
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
..
abstraction Move /src/test to /tests 2023-01-11 09:32:08 +00:00
arrays Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
enums Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
malformed-program-gracefulness Render missing generics suggestion verbosely 2023-01-12 22:04:30 +00:00
primitives Improve safe transmute error reporting 2023-04-13 21:57:08 +00:00
references Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
structs Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
unions Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00
visibility Improve safe transmute error reporting 2023-04-13 21:57:08 +00:00
issue-101739-1.rs Use param's real type in try_eval_lit_or_param 2023-03-09 20:49:11 +00:00
issue-101739-1.stderr Note type mismatch on ConstArgHasType 2023-03-23 19:09:34 +00:00
issue-101739-2.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-101739-2.stderr diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
issue-110467.rs Fix ICE for transmutability in candidate assembly 2023-04-18 17:33:46 -07:00
region-infer.rs Erase regions when confirming transmutability candidate 2023-04-16 19:12:34 +00:00
region-infer.stderr Safe Transmute: Enable handling references, including recursive types 2023-05-24 14:52:18 -07:00