diff options
| author | bors <bors@rust-lang.org> | 2023-09-16 16:48:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-16 16:48:21 +0000 |
| commit | 9d0ccf01a16f4ab72417a804c5a7414f312d95a0 (patch) | |
| tree | 2810db9d27fad45f752041f18dfb4831144a47cf /compiler/rustc_mir_transform/src/coverage/debug.rs | |
| parent | 12e28c35758051dd6bc9cdf419a50dff80fab64d (diff) | |
| parent | cd0a89ac4f5e8b7399ee08f0f41f34d1a84cbd3f (diff) | |
| download | rust-9d0ccf01a16f4ab72417a804c5a7414f312d95a0.tar.gz rust-9d0ccf01a16f4ab72417a804c5a7414f312d95a0.zip | |
Auto merge of #15597 - rmehri01:fix_promote_local_field_shorthand, r=HKalbasi
Field shorthand overwritten in promote local to const assist
Currently, running `promote_local_to_const` on the following:
```rust
struct Foo {
bar: usize,
}
fn main() {
let $0bar = 0;
let foo = Foo { bar };
}
```
Results in:
```rust
struct Foo {
bar: usize,
}
fn main() {
const BAR: usize = 0;
let foo = Foo { BAR };
}
```
But instead should be something like:
```rust
struct Foo {
bar: usize,
}
fn main() {
const BAR: usize = 0;
let foo = Foo { bar: BAR };
}
```
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
