]> git.lizzy.rs Git - rust.git/commit
Auto merge of #37247 - jseyfried:future_proof_no_link, r=nrc
authorbors <bors@rust-lang.org>
Fri, 21 Oct 2016 08:48:31 +0000 (01:48 -0700)
committerGitHub <noreply@github.com>
Fri, 21 Oct 2016 08:48:31 +0000 (01:48 -0700)
commitda5b6467c33f7f86b4964b08b37726f7611a8f0c
treebda505a46fc98c456aa2012b41af936d99fb1a79
parente4708273b5401cd572d19f8836e121ce39dc2767
parentb283aaf0ff74db93162b402e627f3b4ed7fb7d4e
Auto merge of #37247 - jseyfried:future_proof_no_link, r=nrc

macros: Future proof `#[no_link]`

This PR future proofs `#[no_link]` for macro modularization (cc #35896).

First, we resolve all `#[no_link] extern crate`s. `#[no_link]` crates without `#[macro_use]` or `#[macro_reexport]` are not resolved today, this is a [breaking-change]. For example,
```rust
```
Any breakage can be fixed by simply removing the `#[no_link] extern crate`.

Second, `#[no_link] extern crate`s will define an empty module in type namespace to eventually allow importing the crate's macros with `use`. This is a [breaking-change], for example:
```rust
mod syntax {} //< This becomes a duplicate error.
```

r? @nrc
src/librustc_resolve/build_reduced_graph.rs