diff --git a/cranelift/src/libreader/parser.rs b/cranelift/src/libreader/parser.rs index 4a10f1cec7..63a635b3f7 100644 --- a/cranelift/src/libreader/parser.rs +++ b/cranelift/src/libreader/parser.rs @@ -28,9 +28,7 @@ pub use lexer::Location; /// /// Any test commands or ISA declarations are ignored. pub fn parse_functions(text: &str) -> Result> { - Parser::new(text) - .parse_function_list() - .map(|list| list.into_iter().map(|(func, _)| func).collect()) + parse_test(text).map(|file| file.functions.into_iter().map(|(func, _)| func).collect()) } /// Parse the entire `text` as a test case file.