diff options
| -rw-r--r-- | src/librustc/middle/lib_features.rs | 3 | ||||
| -rw-r--r-- | src/librustc/middle/stability.rs | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc/middle/lib_features.rs b/src/librustc/middle/lib_features.rs index a1abfb704ec..365fe1e6b5a 100644 --- a/src/librustc/middle/lib_features.rs +++ b/src/librustc/middle/lib_features.rs @@ -171,5 +171,8 @@ pub fn collect<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> LibFeatures { } collector.collect_from_attrs(&tcx.hir.krate().attrs); tcx.hir.krate().visit_all_item_likes(&mut collector); + for exported_macro in &tcx.hir.krate().exported_macros { + collector.collect_from_attrs(&exported_macro.attrs); + } collector.lib_features } diff --git a/src/librustc/middle/stability.rs b/src/librustc/middle/stability.rs index 34b253ff9c6..98c2eaaeb61 100644 --- a/src/librustc/middle/stability.rs +++ b/src/librustc/middle/stability.rs @@ -840,10 +840,6 @@ pub fn check_unused_or_stable_features<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) { // FIXME(varkor): we don't properly handle lib features behind `cfg` attributes yet, // but it happens just to affect `libc`, so we're just going to hard-code it for now. remaining_lib_features.remove(&Symbol::intern("libc")); - // FIXME(varkor): we have a problem gathering features on macros right now, so we're - // going to hard-code some features here for now. - remaining_lib_features.remove(&Symbol::intern("await_macro")); - remaining_lib_features.remove(&Symbol::intern("unstable_macros")); for (feature, stable) in tcx.lib_features().iter() { if let Some(since) = stable { |
