diff options
| author | bors <bors@rust-lang.org> | 2022-08-31 13:34:43 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-31 13:34:43 +0000 |
| commit | cf05b7db4d185383f100ab9d53b460686280aaed (patch) | |
| tree | 693ecb62a5554dd07aa25f589f44adcbda2f2c73 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff | |
| parent | d9e22079c4cb8ffb0076cf52c37be343582ad418 (diff) | |
| parent | 45dac9a3ef029f216cc0369ee0f1522c2a2aa03e (diff) | |
| download | rust-cf05b7db4d185383f100ab9d53b460686280aaed.tar.gz rust-cf05b7db4d185383f100ab9d53b460686280aaed.zip | |
Auto merge of #13051 - DropDemBits:attrs-and-comments-on-enum-variant, r=jonas-schievink
fix: Only move comments when extracting a struct from an enum variant
Motivating example:
```rs
#[derive(Debug, thiserror::Error)]
enum Error {
/// Some explanation for this error
#[error("message")]
$0Woops {
code: u32
}
}
```
now becomes
```rs
/// Some explanation for this error
#[derive(Debug, thiserror::Error)]
struct Woops{
code: u32
}
#[derive(Debug, thiserror::Error)]
enum Error {
#[error("message")]
Woops(Woops)
}
```
(the `thiserror::Error` derive being copied and the struct formatting aren't ideal, though those are issues for another day)
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions
