diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2017-03-25 04:04:13 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2017-03-25 04:04:13 +0000 |
| commit | 29a052d2d807dcb9f1d45878a3083af7a993263d (patch) | |
| tree | 0567e1792355119542aee719811e6b273eba6fd6 /src/test | |
| parent | 49c67bd632e961a57863805e5d0a400f97da9b93 (diff) | |
| download | rust-29a052d2d807dcb9f1d45878a3083af7a993263d.tar.gz rust-29a052d2d807dcb9f1d45878a3083af7a993263d.zip | |
Fix ICE with nested macros in certain situations.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/issue-40770.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-40770.rs b/src/test/run-pass/issue-40770.rs new file mode 100644 index 00000000000..599d0b273e3 --- /dev/null +++ b/src/test/run-pass/issue-40770.rs @@ -0,0 +1,19 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +macro_rules! m { + ($e:expr) => { + macro_rules! n { () => { $e } } + } +} + +fn main() { + m!(foo!()); +} |
