From deab4caa7b1ba81c1b7e6561bc270bbde6467f13 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 12 Jul 2019 19:41:13 +0300 Subject: make Parse fields private this is in preparation for the new rowan API --- crates/ra_mbe/src/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_mbe/src') diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index 1db35cd8d..5a1494fee 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs @@ -95,8 +95,8 @@ pub(crate) fn expand_to_expr( pub(crate) fn text_to_tokentree(text: &str) -> tt::Subtree { // wrap the given text to a macro call let wrapped = format!("wrap_macro!( {} )", text); - let wrapped = ast::SourceFile::parse(&wrapped).tree; - let wrapped = wrapped.syntax().descendants().find_map(ast::TokenTree::cast).unwrap(); + let wrapped = ast::SourceFile::parse(&wrapped); + let wrapped = wrapped.tree().syntax().descendants().find_map(ast::TokenTree::cast).unwrap(); let mut wrapped = ast_to_token_tree(wrapped).unwrap().0; wrapped.delimiter = tt::Delimiter::None; -- cgit v1.2.3