Skip to content

Commit 83fbddd

Browse files
committed
ignore #[rustc_allow_const_fn_unstable] for macro expansion
Recognition for `rustc_allow_const_fn_unstable` attribute was errorneously added in 05f4a9a.
1 parent 3a63bf0 commit 83fbddd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

compiler/rustc_expand/src/base.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -768,13 +768,8 @@ impl SyntaxExtension {
768768
name: Symbol,
769769
attrs: &[ast::Attribute],
770770
) -> SyntaxExtension {
771-
let allow_internal_unstable = {
772-
let mut feat_list = Vec::new();
773-
attr::allow_internal_unstable(sess, &attrs).map(|features| feat_list.extend(features));
774-
attr::rustc_allow_const_fn_unstable(sess, &attrs)
775-
.map(|features| feat_list.extend(features));
776-
Some(feat_list.into())
777-
};
771+
let allow_internal_unstable = attr::allow_internal_unstable(sess, &attrs)
772+
.map(|features| features.collect::<Vec<Symbol>>().into());
778773

779774
let mut local_inner_macros = false;
780775
if let Some(macro_export) = sess.find_by_name(attrs, sym::macro_export) {

0 commit comments

Comments
 (0)