We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
:vis
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code below leads to parse error in rustc 1.19.0-nightly (e40beb3af 2017-05-11).
rustc 1.19.0-nightly (e40beb3af 2017-05-11)
#![feature(macro_vis_matcher)] macro_rules! foo { ($v:vis) => {} } fn main() { foo!(); //~ ERROR unexpected end of macro invocation foo!(pub(in self)); }
foo!() is expanded correctly.
foo!()
The text was updated successfully, but these errors were encountered:
Triage: Interesting. :vis (stable since Rust 1.30) is optional, but not by itself. Not sure if the current behavior is a bug or a feature.
Playground:
macro_rules! optional_vis { ($v:vis const) => {} } macro_rules! not_optional_vis { ($v:vis) => {} } fn main() { optional_vis!(pub const); optional_vis!(const); // OK! not_optional_vis!(pub); not_optional_vis!(); //~ ERROR unexpected end of macro invocation }
Sorry, something went wrong.
No branches or pull requests
Observed behavior
The code below leads to parse error in
rustc 1.19.0-nightly (e40beb3af 2017-05-11)
.Expected behavior
foo!()
is expanded correctly.The text was updated successfully, but these errors were encountered: