about summary refs log tree commit diff
path: root/src/liballoc_jemalloc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-10-19 06:33:10 -0700
committerGitHub <noreply@github.com>2016-10-19 06:33:10 -0700
commitcfc9b5185bbf5ab04a2736347bfa7fd9ab70c1e7 (patch)
tree52adabcf51c925346f633af820f0f8404de5f4d1 /src/liballoc_jemalloc
parenta41505f4f4a93bf94f4f7439d41afd826ab20b94 (diff)
parent8b0c292a728c113aaf1f27f079aae6a28110c587 (diff)
downloadrust-cfc9b5185bbf5ab04a2736347bfa7fd9ab70c1e7.tar.gz
rust-cfc9b5185bbf5ab04a2736347bfa7fd9ab70c1e7.zip
Auto merge of #37213 - jseyfried:refactor_crate_var, r=nrc
macros: improve `$crate`

This PR refactors the implementation of `$crate` so that
 - `$crate` is only allowed at the start of a path (like `super`),
 - we can make `$crate` work with inter-crate re-exports (groundwork for macro modularization), and
 - we can support importing macros from an extern crate that is not declared at the crate root (also groundwork for macro modularization).

This is a [breaking-change]. For example, the following would break:
```rust
fn foo() {}
macro_rules! m { () => {
    $crate foo $crate () $crate $crate;
    //^ Today, `$crate` is allowed just about anywhere in unexported macros.
} }
fn main() {
    m!();
}
```
r? @nrc
Diffstat (limited to 'src/liballoc_jemalloc')
0 files changed, 0 insertions, 0 deletions