Rollup merge of #132651 - PonasKovas:master, r=fmease
Remove attributes from generics in built-in derive macros Related issue #132561 Removes all attributes from generics in the expanded implementations of built-in derive macros.
This commit is contained in:
commit
b18ee9858b
3 changed files with 37 additions and 0 deletions
|
@ -680,6 +680,12 @@ impl<'a> TraitDef<'a> {
|
|||
param_clone
|
||||
}
|
||||
})
|
||||
.map(|mut param| {
|
||||
// Remove all attributes, because there might be helper attributes
|
||||
// from other macros that will not be valid in the expanded implementation.
|
||||
param.attrs.clear();
|
||||
param
|
||||
})
|
||||
.collect();
|
||||
|
||||
// and similarly for where clauses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue