Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit 639f493

Browse files
committed
Allow space in attribute list
1 parent 7e7e8f2 commit 639f493

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

impl/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ fn parse(input: TokenStream) -> Hack {
6464
let source = input.to_string();
6565

6666
let mut front = source.split_whitespace();
67-
assert_eq!(Some("#[allow(unused,"), front.next());
67+
let next = front.next().unwrap();
68+
if next == "#[allow(unused" {
69+
assert_eq!(Some(","), front.next());
70+
} else {
71+
assert_eq!("#[allow(unused,", next);
72+
}
6873
assert_eq!(Some("non_camel_case_types)]"), front.next());
6974

7075
let mut back = source.split_whitespace().rev();

0 commit comments

Comments
 (0)