diff options
| author | DianQK <dianqk@dianqk.net> | 2024-08-21 21:45:47 +0800 |
|---|---|---|
| committer | DianQK <dianqk@dianqk.net> | 2024-09-14 13:30:35 +0800 |
| commit | c16c22cc9c4daf4485c78e789c6e2a4bedea83b4 (patch) | |
| tree | 691c48b1fb95ed794a49307cb4b170fdea237f0f /compiler/rustc_mir_transform/src/ssa.rs | |
| parent | 23b04c0513472f3728ad482398008e077979e5c4 (diff) | |
| download | rust-c16c22cc9c4daf4485c78e789c6e2a4bedea83b4.tar.gz rust-c16c22cc9c4daf4485c78e789c6e2a4bedea83b4.zip | |
Simplify the canonical clone method to copy
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);
```
Diffstat (limited to 'compiler/rustc_mir_transform/src/ssa.rs')
0 files changed, 0 insertions, 0 deletions
