Skip to content

Commit

Permalink
Test that byte order mark can only go at beginning of input
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 29, 2022
1 parent e2327f0 commit 1d068c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test.rs
Expand Up @@ -639,4 +639,7 @@ fn byte_order_mark() {
TokenTree::Ident(ident) => assert_eq!(ident, "foo"),
_ => unreachable!(),
}

let string = "foo\u{feff}";
string.parse::<TokenStream>().unwrap_err();
}

0 comments on commit 1d068c8

Please sign in to comment.