about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-06-21 11:50:30 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-07 13:04:07 +0300
commit3542995ff9d04684ccd0a856e97d1c981fbf74c4 (patch)
tree0a975869fad3f2f2511c2f0e0592b66ce03643ea /src/libsyntax/ext/tt
parent73dec4a804c0dd63405f01f38664e6026a56df31 (diff)
downloadrust-3542995ff9d04684ccd0a856e97d1c981fbf74c4.tar.gz
rust-3542995ff9d04684ccd0a856e97d1c981fbf74c4.zip
syntax: Keep full `Stability` in `SyntaxExtension`
Diffstat (limited to 'src/libsyntax/ext/tt')
-rw-r--r--src/libsyntax/ext/tt/macro_rules.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index 341d68c9c32..5b5588a02f2 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -422,8 +422,6 @@ pub fn compile(
                 })
         });
 
-    let allow_internal_unsafe = attr::contains_name(&def.attrs, sym::allow_internal_unsafe);
-
     let mut local_inner_macros = false;
     if let Some(macro_export) = attr::find_by_name(&def.attrs, sym::macro_export) {
         if let Some(l) = macro_export.meta_item_list() {
@@ -431,23 +429,14 @@ pub fn compile(
         }
     }
 
-    let unstable_feature =
-        attr::find_stability(&sess, &def.attrs, def.span).and_then(|stability| {
-            if let attr::StabilityLevel::Unstable { issue, .. } = stability.level {
-                Some((stability.feature, issue))
-            } else {
-                None
-            }
-        });
-
     SyntaxExtension {
         kind: SyntaxExtensionKind::LegacyBang(expander),
         span: def.span,
         default_transparency,
         allow_internal_unstable,
-        allow_internal_unsafe,
+        allow_internal_unsafe: attr::contains_name(&def.attrs, sym::allow_internal_unsafe),
         local_inner_macros,
-        unstable_feature,
+        stability: attr::find_stability(&sess, &def.attrs, def.span),
         helper_attrs: Vec::new(),
         edition,
     }