about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-31 13:34:43 +0000
committerbors <bors@rust-lang.org>2022-08-31 13:34:43 +0000
commitcf05b7db4d185383f100ab9d53b460686280aaed (patch)
tree693ecb62a5554dd07aa25f589f44adcbda2f2c73 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-unwind.diff
parentd9e22079c4cb8ffb0076cf52c37be343582ad418 (diff)
parent45dac9a3ef029f216cc0369ee0f1522c2a2aa03e (diff)
downloadrust-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