about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/tests.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-29 09:59:17 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2025-04-30 10:36:03 +0300
commit6668d13de27be6382f06cbdc253d9a48f62e4c34 (patch)
tree67f9283035f5e2dda9d53cc64d46d5e92844d675 /compiler/rustc_parse/src/parser/tests.rs
parent427288b3ce2d574847fdb41cc3184c893750e09a (diff)
downloadrust-6668d13de27be6382f06cbdc253d9a48f62e4c34.tar.gz
rust-6668d13de27be6382f06cbdc253d9a48f62e4c34.zip
ast: Remove token visiting from AST visitor
It's no longer necessary after the removal of nonterminal tokens in #124141.
Diffstat (limited to 'compiler/rustc_parse/src/parser/tests.rs')
-rw-r--r--compiler/rustc_parse/src/parser/tests.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/tests.rs b/compiler/rustc_parse/src/parser/tests.rs
index 8285070839a..2a44c90abc1 100644
--- a/compiler/rustc_parse/src/parser/tests.rs
+++ b/compiler/rustc_parse/src/parser/tests.rs
@@ -95,12 +95,6 @@ pub(crate) fn string_to_stream(source_str: String) -> TokenStream {
     ))
 }
 
-/// Parses a string, returns a crate.
-pub(crate) fn string_to_crate(source_str: String) -> ast::Crate {
-    let psess = psess();
-    with_error_checking_parse(source_str, &psess, |p| p.parse_crate_mod())
-}
-
 /// Does the given string match the pattern? whitespace in the first string
 /// may be deleted or replaced with other whitespace to match the pattern.
 /// This function is relatively Unicode-ignorant; fortunately, the careful design