From 0efbcdf43544af471a935c790ae99e2a9b5516c3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 28 May 2019 17:34:28 +0300 Subject: remove old parsing methods --- crates/ra_syntax/src/ast.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'crates/ra_syntax/src/ast.rs') diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index f7e33366e..319110b6a 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs @@ -80,7 +80,9 @@ fn test_doc_comment_none() { // non-doc mod foo {} "#, - ); + ) + .ok() + .unwrap(); let module = file.syntax().descendants().find_map(Module::cast).unwrap(); assert!(module.doc_comment_text().is_none()); } @@ -93,7 +95,9 @@ fn test_doc_comment_of_items() { // non-doc mod foo {} "#, - ); + ) + .ok() + .unwrap(); let module = file.syntax().descendants().find_map(Module::cast).unwrap(); assert_eq!("doc", module.doc_comment_text().unwrap()); } @@ -110,7 +114,9 @@ fn test_doc_comment_preserves_indents() { /// ``` mod foo {} "#, - ); + ) + .ok() + .unwrap(); let module = file.syntax().descendants().find_map(Module::cast).unwrap(); assert_eq!("doc1\n```\nfn foo() {\n // ...\n}\n```", module.doc_comment_text().unwrap()); } @@ -133,7 +139,9 @@ where for<'a> F: Fn(&'a str) {} "#, - ); + ) + .ok() + .unwrap(); let where_clause = file.syntax().descendants().find_map(WhereClause::cast).unwrap(); let mut predicates = where_clause.predicates(); -- cgit v1.2.3