Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: suggest quotes only for ident attribute values
When encountering code like: ``` #[cfg(key = ["a", "b"])] fn main() {} ``` the parser incorrectly suggests: ``` error: expected unsuffixed literal, found `[` --> ../pg/src/main.rs:1:13 | 1 | #[cfg(key = ["foo", "bar"])] | ^ | help: surround the identifier with quotation marks to parse it as a string | 1 | #[cfg(key =" "["foo", "bar"])] | + + error: aborting due to 1 previous error ``` This commit modifies the parser to check if an attribute value is an ident before suggesting.
- Loading branch information