Closed
Description
Test case:
#![feature(macro_vis_matcher)]
macro_rules! foo {
($($p:vis)*) => {}
}
foo!(a);
Compiling this stuck forever in the "expansion" pass.
$ rustc -Ztime-passes b.rs
time: 0.000 parsing
time: 0.000 recursion limit
time: 0.000 crate injection
time: 0.000 plugin loading
time: 0.000 plugin registration
^C
cc #41022 (:vis
tracking issue).
Since :vis
can match "nothing", the macro should error with "repetition matches empty token tree".
$ rustc -vV
rustc 1.19.0-nightly (fe7227f6c 2017-06-16)
binary: rustc
commit-hash: fe7227f6c8704f0186091085a14fd1027920e4bb
commit-date: 2017-06-16
host: x86_64-apple-darwin
release: 1.19.0-nightly
LLVM version: 4.0