diff options
| author | surechen <chenshuo17@huawei.com> | 2024-07-10 20:27:38 +0800 |
|---|---|---|
| committer | surechen <chenshuo17@huawei.com> | 2024-07-17 10:07:02 +0800 |
| commit | 4821b84b92a2f2bbed06191cab5cc44693e0652b (patch) | |
| tree | 483be9d7ec6ea382d08b576ec894498a312e5a48 /compiler/rustc_codegen_gcc | |
| parent | 7d356ebde329df5f38186efe3e7c5e8dabac7cb7 (diff) | |
| download | rust-4821b84b92a2f2bbed06191cab5cc44693e0652b.tar.gz rust-4821b84b92a2f2bbed06191cab5cc44693e0652b.zip | |
If the moved value is a mut reference, it is used in a generic function and it's type is a generic param, it can be reborrowed to avoid moving.
for example:
```rust
struct Y(u32);
// x's type is '& mut Y' and it is used in `fn generic<T>(x: T) {}`.
fn generic<T>(x: T) {}
```
fixes #127285
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
