about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-17 22:57:34 +0200
committerGitHub <noreply@github.com>2019-08-17 22:57:34 +0200
commitb60f245b9542142ed01318a7ab5b46fc2ffb283e (patch)
tree05a20d770b913b29a9309978f7ac5711994b7fc1 /src/libstd/sys/unix/stack_overflow.rs
parenta00b4f1401d12415d50653a0d4126e1c79151127 (diff)
parent1064d41c96047650897be96190e018be9bbd818a (diff)
downloadrust-b60f245b9542142ed01318a7ab5b46fc2ffb283e.tar.gz
rust-b60f245b9542142ed01318a7ab5b46fc2ffb283e.zip
Rollup merge of #63667 - petrochenkov:deriveholders, r=matthewjasper
resolve: Properly integrate derives and `macro_rules` scopes

So,
```rust
#[derive(A, B)]
struct S;

m!();
```
turns into something like
```rust
struct S;

A_placeholder!( struct S; );

B_placeholder!( struct S; );

m!();
```
during expansion.

And for `m!()` its "`macro_rules` scope" (aka "legacy scope") should point to the `B_placeholder` call rather than to the derive container `#[derive(A, B)]`.

`fn build_reduced_graph` now makes sure the legacy scope points to the right thing.
(It's still a mystery for me why this worked before https://github.com/rust-lang/rust/pull/63535.)

Unfortunately, placeholders from derives are currently treated separately from placeholders from other macros and need to be passed as `extra_placeholders` rather than a part of the AST fragment.
That's fixable, but I wanted to keep this PR more minimal to close the regression faster.

Fixes https://github.com/rust-lang/rust/issues/63651
r? @matthewjasper
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions