Skip to content
New issue

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

Inner attributes don't parse with impls #8661

Closed
nikomatsakis opened this issue Aug 21, 2013 · 1 comment
Closed

Inner attributes don't parse with impls #8661

nikomatsakis opened this issue Aug 21, 2013 · 1 comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) A-parser Area: The parsing of Rust source code to an AST

Comments

@nikomatsakis
Copy link
Contributor

struct foo;

impl foo {
    #[cfg(not(test))];

    fn bar() {}
}

fn main() {}

yields

Running /home/nmatsakis/versioned/rust-m/build/i686-unknown-linux-gnu/stage2/bin/rustc:
/home/nmatsakis/tmp/bar.rs:4:21: 4:22 error: unexpected token: `;`
/home/nmatsakis/tmp/bar.rs:4     #[cfg(not(test))];

@huonw
Copy link
Member

huonw commented Aug 21, 2013

Dup of #3614.

@huonw huonw closed this as completed Aug 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) A-parser Area: The parsing of Rust source code to an AST
Projects
None yet
Development

No branches or pull requests

2 participants