ignore #[rustc_allow_const_fn_unstable] for macro expansion

Recognition for `rustc_allow_const_fn_unstable` attribute was errorneously
added in 05f4a9a42a.
This commit is contained in:
Florian Warzecha 2020-10-23 16:54:25 +02:00
parent 3a63bf0299
commit 83fbdddc99
No known key found for this signature in database
GPG Key ID: 4BE8C7D97F910C60

View File

@ -768,13 +768,8 @@ impl SyntaxExtension {
name: Symbol, name: Symbol,
attrs: &[ast::Attribute], attrs: &[ast::Attribute],
) -> SyntaxExtension { ) -> SyntaxExtension {
let allow_internal_unstable = { let allow_internal_unstable = attr::allow_internal_unstable(sess, &attrs)
let mut feat_list = Vec::new(); .map(|features| features.collect::<Vec<Symbol>>().into());
attr::allow_internal_unstable(sess, &attrs).map(|features| feat_list.extend(features));
attr::rustc_allow_const_fn_unstable(sess, &attrs)
.map(|features| feat_list.extend(features));
Some(feat_list.into())
};
let mut local_inner_macros = false; let mut local_inner_macros = false;
if let Some(macro_export) = sess.find_by_name(attrs, sym::macro_export) { if let Some(macro_export) = sess.find_by_name(attrs, sym::macro_export) {