dtolnay / dtolnay/syn

Error parsing `const impl`

Open
#1,972 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
3.4k
Forks
374
Avg merge
1d 5h
Merged PRs (30d)
2

Description

`const impl`s are unstable, but used by the standard library (e.g. https://doc.rust-lang.org/stable/src/alloc/vec/mod.rs.html#908). They are currently not parsable by syn:

```rust
fn main() {
let r: Result = syn::parse_str(r###"const impl Foo {}"###);

println!("{:?}", r);
}
```

will output

```text
Err(Error("expected identifier or `_`"))
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.