Add test of ineffective TokenStream size_hint

This commit is contained in:
David Tolnay 2022-07-24 21:34:03 -07:00
parent 6ed82b0b83
commit f4273659a2
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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