From f4273659a28f2d1f82cc30bbcad69d833383c23d Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 24 Jul 2022 21:34:03 -0700 Subject: [PATCH] Add test of ineffective TokenStream size_hint --- tests/test.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test.rs b/tests/test.rs index 86031db6..99874e9a 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -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::().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