Local ambiguity in macro definition
1d767c1
Opened by Jonas Schievink at
macro_rules! m {
() => ();;
}
<anon>:2:14: 2:15 error: local ambiguity: multiple parsing options: built-in NTs tt ('lhs') or 1 other options.
<anon>:2 () => ();;
^
(the equivalent of $( $lhs:tt => $rhs:tt );+ $(;)* is used to parse macros)
This leaks "lhs", which is an implementation detail, and is a bad error message.
Still repros.
Brian Anderson at 2017-06-01 16:48:35
Bad error message.
Brian Anderson at 2017-06-01 16:50:30
Seems to me to be primarily a bad error message -- it's not clear we should accept trailing
;(we don't accept trailing separators in any other context?)Niko Matsakis at 2017-06-01 16:50:47
Triage: still happens:
error: local ambiguity: multiple parsing options: built-in NTs tt ('lhs') or 1 other option. --> src/lib.rs:2:14 | 2 | () => ();; | ^ error: aborting due to previous errorEsteban Kuber at 2018-10-15 21:34:59
Triage: same behavior now.
Mazdak Farrokhzad at 2019-02-18 00:05:53