]> git.lizzy.rs Git - rust.git/commitdiff
Merge #1277
authorbors[bot] <bors[bot]@users.noreply.github.com>
Mon, 27 May 2019 07:38:21 +0000 (07:38 +0000)
committerbors[bot] <bors[bot]@users.noreply.github.com>
Mon, 27 May 2019 07:38:21 +0000 (07:38 +0000)
1277: Improve macro item resolution r=matklad a=edwin0cheng

~This PR add a new namespace `Macros` in `per_ns.rs` to allow following use case:~
This PR improve macro item resolution to allow following use case:

```rust
//- /main.rs
use foo::bar;
bar!();

//- /lib.rs  (crate foo)
#[macro_export]
macro_rules! bar{
() => {
    struct Foo { field: u32 }
}
```

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>

Trivial merge