Generate stability attributes for derived impls

The attributes are copied from the item for which the trait impl is derived
This commit is contained in:
Vadim Petrochenkov 2015-10-19 01:52:08 +03:00
parent be91042913
commit 629c2a840c

View file

@ -417,7 +417,7 @@ impl<'a> TraitDef<'a> {
let mut attrs = newitem.attrs.clone();
attrs.extend(item.attrs.iter().filter(|a| {
match &a.name()[..] {
"allow" | "warn" | "deny" | "forbid" => true,
"allow" | "warn" | "deny" | "forbid" | "stable" | "unstable" => true,
_ => false,
}
}).cloned());