Skip to content

Nonsensical macro_rules error message #18328

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
alexchandel opened this issue Oct 26, 2014 · 1 comment
Closed

Nonsensical macro_rules error message #18328

alexchandel opened this issue Oct 26, 2014 · 1 comment

Comments

@alexchandel
Copy link

Consider the following (malformed) macro definition:

#![feature(macro_rules)]

macro_rules! foo( (i: ident) => (
        i[0] = 7;
    );
)

fn main() {
    let mut i = vec!(0u, 1, 2, 3);
    foo!();
    println!("{}", i);
}

Compiling this fails with:

<anon>:1:1: 1:1 error: unexpected end of macro invocation
<anon>:1 #![feature(macro_rules)]
         ^

This isn't helpful.

@huonw
Copy link
Member

huonw commented Oct 26, 2014

Dupe of #7970.

@huonw huonw closed this as completed Oct 26, 2014
lnicola pushed a commit to lnicola/rust that referenced this issue Oct 22, 2024
…Veykril

fix: Fix CI running analysis-stats incorrectly against the standard libraries

Fixes rust-lang/rust-analyzer#18326
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants