<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_transmute/src/maybe_transmutable/mod.rs, branch 1.76.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.76.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.76.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-10-06T00:25:32+00:00</updated>
<entry>
<title>Remove the `MaybeTransmutableQuery&lt;&amp;'l Dfa&lt;...&gt;, C&gt;` impl.</title>
<updated>2023-10-06T00:25:32+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-10-06T00:25:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=29ed8e492ab99391e9eaa1247fbafe2759f9c383'/>
<id>urn:sha1:29ed8e492ab99391e9eaa1247fbafe2759f9c383</id>
<content type='text'>
Because there is also a `MaybeTransmutableQuery&lt;Dfa&lt;...&gt;, C&gt;` impl, and
we don't need both.
</content>
</entry>
<entry>
<title>Fix a comment.</title>
<updated>2023-10-06T00:22:06+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-10-06T00:21:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=73420fc13bb23151f1baa7199ffa3a38ab955de4'/>
<id>urn:sha1:73420fc13bb23151f1baa7199ffa3a38ab955de4</id>
<content type='text'>
It was duplicated from the method above.
</content>
</entry>
<entry>
<title>Remove `map_layouts`.</title>
<updated>2023-10-06T00:21:08+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-10-06T00:20:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=449b84cb99203a1eaa735f49958b6ddabc8de779'/>
<id>urn:sha1:449b84cb99203a1eaa735f49958b6ddabc8de779</id>
<content type='text'>
As per the `FIXME` comment, it's an abstraction that makes the code
harder to read.
</content>
</entry>
<entry>
<title>Fix error report for size overflow from transmute</title>
<updated>2023-09-05T22:48:34+00:00</updated>
<author>
<name>yukang</name>
<email>moorekang@gmail.com</email>
</author>
<published>2023-09-03T02:58:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=00010eda8b2828da967a562c093c6723889203ae'/>
<id>urn:sha1:00010eda8b2828da967a562c093c6723889203ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Safe Transmute: Refactor error handling and Answer type</title>
<updated>2023-06-12T23:56:21+00:00</updated>
<author>
<name>Bryan Garza</name>
<email>1396101+bryangarza@users.noreply.github.com</email>
</author>
<published>2023-06-12T23:35:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f4cf8f65a5e8e110c8c36469d31f16e8571e2c1a'/>
<id>urn:sha1:f4cf8f65a5e8e110c8c36469d31f16e8571e2c1a</id>
<content type='text'>
- Create `Answer` type that is not just a type alias of `Result`
- Remove a usage of `map_layouts` to make the code easier to read
- Don't hide errors related to Unknown Layout when computing transmutability
</content>
</entry>
<entry>
<title>Safe Transmute: Update definition of Condition type</title>
<updated>2023-05-25T00:49:56+00:00</updated>
<author>
<name>Bryan Garza</name>
<email>1396101+bryangarza@users.noreply.github.com</email>
</author>
<published>2023-05-25T00:47:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d2164d5c9a17a7c2eefeccf623c278612b2650de'/>
<id>urn:sha1:d2164d5c9a17a7c2eefeccf623c278612b2650de</id>
<content type='text'>
- Change `Condition` to not contain `Answer`s but instead just contain other
  `Condition`s directly.
- Also improve error reporting for `DstHasStricterAlignment`
</content>
</entry>
<entry>
<title>Safe Transmute: Check mutability before creating dst -&gt; src obligation</title>
<updated>2023-05-24T22:00:06+00:00</updated>
<author>
<name>Bryan Garza</name>
<email>1396101+bryangarza@users.noreply.github.com</email>
</author>
<published>2023-04-28T21:06:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=62663582375d7dedf42c0a30bfe04c7b53b452d7'/>
<id>urn:sha1:62663582375d7dedf42c0a30bfe04c7b53b452d7</id>
<content type='text'>
- Only create dst -&gt; src obligation if Dst is mutable
- Add some long comments to explain parts of the transmutability code that were
  unclear to me when reading
- Update/add tests
</content>
</entry>
<entry>
<title>Safe Transmute: Fix propagation of errors</title>
<updated>2023-05-24T21:52:19+00:00</updated>
<author>
<name>Bryan Garza</name>
<email>1396101+bryangarza@users.noreply.github.com</email>
</author>
<published>2023-04-28T00:19:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=94ad084ac611b7c21d4f08b1eb30623f09db2cd0'/>
<id>urn:sha1:94ad084ac611b7c21d4f08b1eb30623f09db2cd0</id>
<content type='text'>
- Make sure that the most specific Reason is the one that bubbles up when we
  are folding over the `Answer` tree. `Reason::DstIsBitIncompatible` is the
  least specific, so that should be used only when there isn't anything else
  available.
- Small fixes where we used the wrong Reason variant.
- Tiny cleanups
</content>
</entry>
<entry>
<title>Safe Transmute: Change Answer type to Result</title>
<updated>2023-05-24T21:52:19+00:00</updated>
<author>
<name>Bryan Garza</name>
<email>1396101+bryangarza@users.noreply.github.com</email>
</author>
<published>2023-04-27T21:38:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=263a4f2cb6b455f9c4ae46493d59369c378a85ea'/>
<id>urn:sha1:263a4f2cb6b455f9c4ae46493d59369c378a85ea</id>
<content type='text'>
This patch updates the `Answer` type from `rustc_transmute` so that it just a
type alias to `Result`. This makes it so that the standard methods for `Result`
can be used to process the `Answer` tree, including being able to make use of
the `?` operator on `Answer`s.

Also, remove some unused functions
</content>
</entry>
<entry>
<title>Safe Transmute: Enable handling references, including recursive types</title>
<updated>2023-05-24T21:52:18+00:00</updated>
<author>
<name>Bryan Garza</name>
<email>1396101+bryangarza@users.noreply.github.com</email>
</author>
<published>2023-04-21T23:49:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8f1cec8d8472c3ffacedd4783c64182a407c72df'/>
<id>urn:sha1:8f1cec8d8472c3ffacedd4783c64182a407c72df</id>
<content type='text'>
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 &lt;jack@wrenn.fyi&gt;
</content>
</entry>
</feed>
