resolve: Do not error on access to proc macros imported with #[macro_use]

This commit is contained in:
Vadim Petrochenkov 2018-08-18 02:04:50 +03:00
parent d3cba9b4b4
commit e411bb33f8
6 changed files with 2 additions and 83 deletions

View file

@ -8,12 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-pass
// aux-build:attr_proc_macro.rs
#[macro_use] extern crate attr_proc_macro;
#[attr_proc_macro]
//~^ ERROR: attribute procedural macros cannot be imported with `#[macro_use]`
struct Foo;
fn main() {

View file

@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-pass
// aux-build:bang_proc_macro.rs
#![feature(proc_macro_non_items)]
@ -17,5 +18,4 @@ extern crate bang_proc_macro;
fn main() {
bang_proc_macro!(println!("Hello, world!"));
//~^ ERROR: procedural macros cannot be imported with `#[macro_use]`
}