Skip to content

Commit 1d068c8

Browse files
committed
Test that byte order mark can only go at beginning of input
1 parent e2327f0 commit 1d068c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,4 +639,7 @@ fn byte_order_mark() {
639639
TokenTree::Ident(ident) => assert_eq!(ident, "foo"),
640640
_ => unreachable!(),
641641
}
642+
643+
let string = "foo\u{feff}";
644+
string.parse::<TokenStream>().unwrap_err();
642645
}

0 commit comments

Comments
 (0)