File tree Expand file tree Collapse file tree 3 files changed +40
-2
lines changed Expand file tree Collapse file tree 3 files changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,8 @@ impl<'a> Resolver<'a> {
312312
313313 self . indeterminate_imports . push ( directive) ;
314314 match directive. subclass {
315- SingleImport { target, .. } => {
316- self . per_ns ( |this, ns| {
315+ SingleImport { target, type_ns_only , .. } => {
316+ self . per_ns ( |this, ns| if !type_ns_only || ns == TypeNS {
317317 let mut resolution = this. resolution ( current_module, target, ns) . borrow_mut ( ) ;
318318 resolution. single_imports . add_directive ( directive, this. use_extern_macros ) ;
319319 } ) ;
Original file line number Diff line number Diff line change 1+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ pub mod foobarius { }
12+
13+ #[ macro_export]
14+ macro_rules! foobarius {
15+ ( ) => { ( ) }
16+ }
Original file line number Diff line number Diff line change 1+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ // aux-build:use-macro-self.rs
12+
13+ #![ feature( use_extern_macros) ]
14+
15+ #[ macro_use]
16+ extern crate use_macro_self;
17+
18+ use use_macro_self:: foobarius:: { self } ;
19+
20+ fn main ( ) {
21+ let _: ( ) = foobarius ! ( ) ; // OK, the macro returns `()`
22+ }
You can’t perform that action at this time.
0 commit comments