From 03876ec1b12ed0080fe3a29a8161229cc5fd3c86 Mon Sep 17 00:00:00 2001 From: est31 Date: Wed, 31 May 2017 21:12:02 +0200 Subject: [PATCH] Fix a test and address review comment --- src/librustc_resolve/lib.rs | 2 +- src/test/compile-fail/feature-gate-decl_macro.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index b4c6b8ec856c8..5b633e3d46223 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -1200,7 +1200,7 @@ pub struct Resolver<'a> { pub found_unresolved_macro: bool, // List of crate local macros that we need to warn about as being unused. - // Right now this only includes macro_rules! macros, and 2.0 macros. + // Right now this only includes macro_rules! macros, and macros 2.0. unused_macros: FxHashSet, // Maps the `Mark` of an expansion to its containing module or block. diff --git a/src/test/compile-fail/feature-gate-decl_macro.rs b/src/test/compile-fail/feature-gate-decl_macro.rs index af7d5fec07199..c5c83977c77fd 100644 --- a/src/test/compile-fail/feature-gate-decl_macro.rs +++ b/src/test/compile-fail/feature-gate-decl_macro.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![allow(unused_macros)] + macro m() {} //~ ERROR `macro` is experimental (see issue #39412) //~| HELP add #![feature(decl_macro)] to the crate attributes to enable