diff options
| author | bors <bors@rust-lang.org> | 2017-02-12 23:21:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-02-12 23:21:15 +0000 |
| commit | 956e2bcbaa00c05e051718b1375375915064f1c3 (patch) | |
| tree | a3063138179425237fe22fd4b30065ca96a98c34 /src/rustllvm/RustWrapper.cpp | |
| parent | 81bd2675eaf96396e363d63aa068b0a462ec5a6d (diff) | |
| parent | 2cc61eebb7f1677af2a20f76fb1411ed40f6901b (diff) | |
| download | rust-956e2bcbaa00c05e051718b1375375915064f1c3.tar.gz rust-956e2bcbaa00c05e051718b1375375915064f1c3.zip | |
Auto merge of #39572 - jseyfried:fix_inert_attributes, r=nrc
macros: fix inert attributes from `proc_macro_derives` with `#![feature(proc_macro)]`
This PR refactors collection of `proc_macro_derive` invocations to fix #39347.
After this PR, the input to a `#[proc_macro_derive]` function no longer sees `#[derive]`s on the underlying item. For example, consider:
```rust
extern crate my_derives;
use my_derives::{Trait, Trait2};
#[derive(Copy, Clone)]
#[derive(Trait)]
#[derive(Trait2)]
struct S;
```
Today, the input to the `Trait` derive is `#[derive(Copy, Clone, Trait2)] struct S;`, and the input to the `Trait2` derive is `#[derive(Copy, Clone)] struct S;`. More generally, a `proc_macro_derive` sees all builtin derives, as well as all `proc_macro_derive`s listed *after* the one being invoked.
After this PR, both `Trait` and `Trait2` will see `struct S;`.
This is a [breaking-change], but I believe it is highly unlikely to cause breakage in practice.
r? @nrc
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
