diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-11-17 20:11:21 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-17 20:11:21 +0000 |
| commit | fdd49b97133a77ff652017d24b72ced37d4a822d (patch) | |
| tree | 31d7f6f05c2f0333a97674288f8208f92dd6e591 /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff | |
| parent | 32f425d801ad46c888a3a3639c5e2edbff4f3811 (diff) | |
| parent | f72512f1c61a915402979ffe83dd2ac09970ab27 (diff) | |
| download | rust-fdd49b97133a77ff652017d24b72ced37d4a822d.tar.gz rust-fdd49b97133a77ff652017d24b72ced37d4a822d.zip | |
Merge #10789
10789: internal: Check for derive attributes by item path, not `derive` identifier r=Veykril a=Veykril
Prior we only checked if an attribute is the exact `derive` identifier and nothing else to collect derive attributes. That means when we encounter the following:
```rs
#[::core::macros::builtin::derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ModPath {
pub kind: PathKind,
segments: Vec<Name>,
}
```
We won't actually expand the derive attributes, but instead we just expand the `derive` attribute with our dummy identity expander.
The changes here make it so we actually lookup the attribute path, check if it is the derive attribute and then collect the derives.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions
