Skip to content

Commit

Permalink
Add test of ineffective TokenStream size_hint
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 25, 2022
1 parent 6ed82b0 commit f427365
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,13 @@ fn default_tokenstream_is_empty() {
assert!(default_token_stream.is_empty());
}

#[test]
fn tokenstream_size_hint() {
let tokens = "a b (c d) e".parse::<TokenStream>().unwrap();

assert_eq!(tokens.into_iter().size_hint(), (0, None)); // FIXME
}

#[test]
fn tuple_indexing() {
// This behavior may change depending on https://github.com/rust-lang/rust/pull/71322
Expand Down

0 comments on commit f427365

Please sign in to comment.