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

Const generics not contained in a block #262

Closed
dtolnay opened this issue Dec 5, 2017 · 0 comments · Fixed by #263
Closed

Const generics not contained in a block #262

dtolnay opened this issue Dec 5, 2017 · 0 comments · Fixed by #263
Assignees
Labels

Comments

@dtolnay
Copy link
Owner

dtolnay commented Dec 5, 2017

The implementation from #261 parses RectangularArray<i32, {2}, {4}> but RFC 2000 allows no block for a generic argument that is a single literal.

extern crate syn;

fn main() {
    let ty = "RectangularArray<i32, 2, 4>";
    println!("{:#?}", syn::parse_str::<syn::Type>(ty).unwrap());
}
@dtolnay dtolnay added the syntax label Dec 5, 2017
@dtolnay dtolnay changed the title Const generics not contained in a block. Const generics not contained in a block Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants