diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-12-11 14:38:09 +1100 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-12-18 10:39:07 +1100 | 
| commit | 809975c94aa8dd69775a0caff819ebb0c81d1966 (patch) | |
| tree | b6bc516c62d45be24827a6c102f0a414347086ef /compiler/rustc_parse/src/parser/tokenstream | |
| parent | 3575e7943b4d4a47c30716c50884d4ceee1b7dcd (diff) | |
| download | rust-809975c94aa8dd69775a0caff819ebb0c81d1966.tar.gz rust-809975c94aa8dd69775a0caff819ebb0c81d1966.zip | |
Rename `RefTokenTreeCursor`.
Because `TokenStreamIter` is a much better name for a `TokenStream` iterator. Also rename the `TokenStream::trees` method as `TokenStream::iter`, and some local variables.
Diffstat (limited to 'compiler/rustc_parse/src/parser/tokenstream')
| -rw-r--r-- | compiler/rustc_parse/src/parser/tokenstream/tests.rs | 8 | 
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); }) } | 
