warn about broken simd not only on structs but also enums and unions when we didn't opt in to it
This commit is contained in:
parent
ad211ced81
commit
b9d6e9e73f
5 changed files with 67 additions and 9 deletions
|
@ -242,7 +242,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
ast::ItemKind::Struct(..) => {
|
||||
ast::ItemKind::Struct(..) | ast::ItemKind::Enum(..) | ast::ItemKind::Union(..) => {
|
||||
for attr in attr::filter_by_name(&i.attrs, sym::repr) {
|
||||
for item in attr.meta_item_list().unwrap_or_else(ThinVec::new) {
|
||||
if item.has_name(sym::simd) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue