<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/mir-opt/gvn_copy_aggregate.enum_identical_variant.GVN.diff, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-09-14T05:30:35+00:00</updated>
<entry>
<title>Simplify the canonical clone method to copy</title>
<updated>2024-09-14T05:30:35+00:00</updated>
<author>
<name>DianQK</name>
<email>dianqk@dianqk.net</email>
</author>
<published>2024-08-21T13:45:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c16c22cc9c4daf4485c78e789c6e2a4bedea83b4'/>
<id>urn:sha1:c16c22cc9c4daf4485c78e789c6e2a4bedea83b4</id>
<content type='text'>
The optimized clone method ends up as the following MIR:

```
_2 = copy ((*_1).0: i32);
_3 = copy ((*_1).1: u64);
_4 = copy ((*_1).2: [i8; 3]);
_0 = Foo { a: move _2, b: move _3, c: move _4 };
```

We can transform this to:

```
_0 = copy (*_1);
```
</content>
</entry>
</feed>
