diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-07 08:51:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-07 08:51:57 +0100 |
| commit | e19cb40fda70ea3f75bc1927c114ea53d231b288 (patch) | |
| tree | cf0891bcc1fca581981d14c7ae6c550fc20f26da /src/libstd/sys/unix/stack_overflow.rs | |
| parent | 883fe10da2f0651540fd5824898b7d7476969c41 (diff) | |
| parent | bceaba86b92325f807351426bfd93ba0513225a4 (diff) | |
| download | rust-e19cb40fda70ea3f75bc1927c114ea53d231b288.tar.gz rust-e19cb40fda70ea3f75bc1927c114ea53d231b288.zip | |
Rollup merge of #65974 - Centril:matcher-friendly-gating, r=petrochenkov
A scheme for more macro-matcher friendly pre-expansion gating
Pre-expansion gating will now avoid gating macro matchers that did not result in `Success(...)`. That is, the following is now OK despite `box 42` being a valid `expr` and that form being pre-expansion gated:
```rust
macro_rules! m {
($e:expr) => { 0 }; // This fails on the input below due to `, foo`.
(box $e:expr, foo) => { 1 }; // Successful matcher, we should get `2`.
}
fn main() {
assert_eq!(1, m!(box 42, foo));
}
```
Closes https://github.com/rust-lang/rust/issues/65846.
r? @petrochenkov
cc @Mark-Simulacrum
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
