This commit is contained in:
Yuki Okushi 2020-01-10 06:52:22 +09:00
parent 59eb49d0da
commit 54f860158b
2 changed files with 21 additions and 1 deletions

View File

@ -202,7 +202,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
ExprKind::Mac(_) => panic!("Shouldn't exist here"),
};
hir::Expr { hir_id: self.lower_node_id(e.id), kind, span: e.span, attrs: e.attrs.clone() }
hir::Expr {
hir_id: self.lower_node_id(e.id),
kind,
span: e.span,
attrs: e.attrs.iter().map(|a| self.lower_attr(a)).collect::<Vec<_>>().into(),
}
}
fn lower_unop(&mut self, u: UnOp) -> hir::UnOp {

View File

@ -0,0 +1,15 @@
// check-pass
macro_rules! def_target {
($target: expr) => {
#[target_feature(enable=$target)]
unsafe fn f() {
#[target_feature(enable=$target)]
()
}
};
}
def_target!("avx2");
fn main() {}