From 6668d13de27be6382f06cbdc253d9a48f62e4c34 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Tue, 29 Apr 2025 09:59:17 +0300 Subject: ast: Remove token visiting from AST visitor It's no longer necessary after the removal of nonterminal tokens in #124141. --- compiler/rustc_parse/src/parser/tests.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'compiler/rustc_parse/src/parser/tests.rs') 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 -- cgit 1.4.1-3-g733a5