1
Fork 0

remove attributes from generics in built-in derive macros

add a test

add github issue link to description of the test

replace new ThinVec with clear()

Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
This commit is contained in:
PonasKovas 2024-11-05 18:55:34 +02:00
parent 096277e989
commit 7c0a7f78a0
3 changed files with 37 additions and 0 deletions

View file

@ -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