about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/tokenstream/tests.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-12-20 06:29:50 +0000
committerGitHub <noreply@github.com>2024-12-20 06:29:50 +0000
commitdb960a25d1cd3cf848506561ac88e7d338c4366c (patch)
tree72ad079ee9a4274d62260de1889ae8a545ac8a74 /compiler/rustc_parse/src/parser/tokenstream/tests.rs
parent0aec399b830cc53e14c056bbd88f93e937129a5b (diff)
parent5e2ce7eb7a76908404d9532cae2628d38cc62b4b (diff)
downloadrust-db960a25d1cd3cf848506561ac88e7d338c4366c.tar.gz
rust-db960a25d1cd3cf848506561ac88e7d338c4366c.zip
Merge pull request #4100 from rust-lang/rustup-2024-12-20
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/parser/tokenstream/tests.rs')
-rw-r--r--compiler/rustc_parse/src/parser/tokenstream/tests.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/tokenstream/tests.rs b/compiler/rustc_parse/src/parser/tokenstream/tests.rs
index b13b68c266a..037b5b1a9de 100644
--- a/compiler/rustc_parse/src/parser/tokenstream/tests.rs
+++ b/compiler/rustc_parse/src/parser/tokenstream/tests.rs
@@ -23,8 +23,8 @@ fn test_concat() {
         let mut eq_res = TokenStream::default();
         eq_res.push_stream(test_fst);
         eq_res.push_stream(test_snd);
-        assert_eq!(test_res.trees().count(), 5);
-        assert_eq!(eq_res.trees().count(), 5);
+        assert_eq!(test_res.iter().count(), 5);
+        assert_eq!(eq_res.iter().count(), 5);
         assert_eq!(test_res.eq_unspanned(&eq_res), true);
     })
 }
@@ -33,7 +33,7 @@ fn test_concat() {
 fn test_to_from_bijection() {
     create_default_session_globals_then(|| {
         let test_start = string_to_ts("foo::bar(baz)");
-        let test_end = test_start.trees().cloned().collect();
+        let test_end = test_start.iter().cloned().collect();
         assert_eq!(test_start, test_end)
     })
 }
@@ -105,6 +105,6 @@ fn test_dotdotdot() {
         stream.push_tree(TokenTree::token_joint(token::Dot, sp(1, 2)));
         stream.push_tree(TokenTree::token_alone(token::Dot, sp(2, 3)));
         assert!(stream.eq_unspanned(&string_to_ts("...")));
-        assert_eq!(stream.trees().count(), 1);
+        assert_eq!(stream.iter().count(), 1);
     })
 }