Skip to content

macros: Future proof #[no_link] - #37247

Merged
bors merged 1 commit into
rust-lang:masterfrom
jseyfried:future_proof_no_link
Oct 21, 2016
Merged

macros: Future proof #[no_link]#37247
bors merged 1 commit into
rust-lang:masterfrom
jseyfried:future_proof_no_link

Conversation

@jseyfried

@jseyfriedjseyfried commented Oct 18, 2016

Copy link
Copy Markdown
Contributor

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

First, we resolve all #[no_link] extern crates. #[no_link] crates without #[macro_use] or #[macro_reexport] are not resolved today, this is a [breaking-change]. For example,

#[no_link]externcrate non_existent_crate;//< this becomes a `crate not found` error.

Any breakage can be fixed by simply removing the #[no_link] extern crate.

Second, #[no_link] extern crates 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:

#[macro_use]#[no_link]externcrate syntax;mod syntax {}//< This becomes a duplicate error.

r? @nrc

@bors

bors commented Oct 19, 2016

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #37269) made this pull request unmergeable. Please resolve the merge conflicts.

@nrc

nrc commented Oct 21, 2016

Copy link
Copy Markdown
Member

@nikomatsakis or @eddyb can we get a crater run for this PR please?

r=me with a clean crater run

@eddyb

eddyb commented Oct 21, 2016

Copy link
Copy Markdown
Contributor

On it.Crater report shows 4 build failures, all download errors (cc @brson).

@bors r=nrc

@bors

bors commented Oct 21, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit b283aaf has been approved by nrc

@bors

bors commented Oct 21, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit b283aaf with merge da5b646...

bors added a commit that referenced this pull request Oct 21, 2016
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
@bors
bors merged commit b283aaf into rust-lang:masterOct 21, 2016
@brsonbrson added the relnotes Marks issues that should be documented in the release notes of the next release. label Oct 24, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotesMarks issues that should be documented in the release notes of the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@jseyfried@bors@nrc@eddyb@brson