You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments