diff options
| author | bors <bors@rust-lang.org> | 2024-09-14 13:30:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-14 13:30:30 +0000 |
| commit | e7386b361dda8c2222bee7a1ae79faba7e9a0351 (patch) | |
| tree | df22ff391c3a9baf1a234a660fb28df4a6495717 /compiler/rustc_privacy/src/lib.rs | |
| parent | 02b1be16c65e5716ade771afde7116ebdfbf9b4a (diff) | |
| parent | 25d434b254bf45347210095600c0a47f65bcaa54 (diff) | |
| download | rust-e7386b361dda8c2222bee7a1ae79faba7e9a0351.tar.gz rust-e7386b361dda8c2222bee7a1ae79faba7e9a0351.zip | |
Auto merge of #128299 - DianQK:clone-copy, r=cjgillot
Simplify the canonical clone method and the copy-like forms to copy
Fixes #128081.
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);
```
r? `@cjgillot`
Diffstat (limited to 'compiler/rustc_privacy/src/lib.rs')
0 files changed, 0 insertions, 0 deletions
