diff options
| author | bors <bors@rust-lang.org> | 2016-10-19 06:33:10 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-19 06:33:10 -0700 |
| commit | cfc9b5185bbf5ab04a2736347bfa7fd9ab70c1e7 (patch) | |
| tree | 52adabcf51c925346f633af820f0f8404de5f4d1 /src/liballoc_jemalloc | |
| parent | a41505f4f4a93bf94f4f7439d41afd826ab20b94 (diff) | |
| parent | 8b0c292a728c113aaf1f27f079aae6a28110c587 (diff) | |
| download | rust-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
