aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs2
-rw-r--r--crates/ra_mbe/src/tests.rs22
2 files changed, 12 insertions, 12 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index fc4133a67..5fc48507f 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -825,7 +825,7 @@ mod tests {
825 #[test] 825 #[test]
826 fn test_token_tree_multi_char_punct() { 826 fn test_token_tree_multi_char_punct() {
827 let source_file = ast::SourceFile::parse("struct Foo { a: x::Y }").ok().unwrap(); 827 let source_file = ast::SourceFile::parse("struct Foo { a: x::Y }").ok().unwrap();
828 let struct_def = source_file.syntax().descendants().find_map(ast::StructDef::cast).unwrap(); 828 let struct_def = source_file.syntax().descendants().find_map(ast::Struct::cast).unwrap();
829 let tt = ast_to_token_tree(&struct_def).unwrap().0; 829 let tt = ast_to_token_tree(&struct_def).unwrap().0;
830 token_tree_to_syntax_node(&tt, FragmentKind::Item).unwrap(); 830 token_tree_to_syntax_node(&tt, FragmentKind::Item).unwrap();
831 } 831 }
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index c43003fd6..286983d60 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -258,7 +258,7 @@ fn test_expr_order() {
258 assert_eq_text!( 258 assert_eq_text!(
259 dump.trim(), 259 dump.trim(),
260 r#"[email protected] 260 r#"[email protected]
261 FN_DEF@0..15 261 [email protected]
262 [email protected] "fn" 262 [email protected] "fn"
263 [email protected] 263 [email protected]
264 [email protected] "bar" 264 [email protected] "bar"
@@ -490,13 +490,13 @@ fn test_expand_to_item_list() {
490 format!("{:#?}", tree).trim(), 490 format!("{:#?}", tree).trim(),
491 r#" 491 r#"
492[email protected] 492[email protected]
493 STRUCT_DEF@0..20 493 [email protected]
494 [email protected] "struct" 494 [email protected] "struct"
495 [email protected] 495 [email protected]
496 [email protected] "Foo" 496 [email protected] "Foo"
497 RECORD_FIELD_DEF_[email protected] 497 [email protected]
498 [email protected] "{" 498 [email protected] "{"
499 RECORD_FIELD_DEF@10..19 499 [email protected]
500 [email protected] 500 [email protected]
501 [email protected] "field" 501 [email protected] "field"
502 [email protected] ":" 502 [email protected] ":"
@@ -506,13 +506,13 @@ [email protected]
506 [email protected] 506 [email protected]
507 [email protected] "u32" 507 [email protected] "u32"
508 [email protected] "}" 508 [email protected] "}"
509 STRUCT_DEF@20..40 509 [email protected]
510 [email protected] "struct" 510 [email protected] "struct"
511 [email protected] 511 [email protected]
512 [email protected] "Bar" 512 [email protected] "Bar"
513 RECORD_FIELD_DEF_[email protected] 513 [email protected]
514 [email protected] "{" 514 [email protected] "{"
515 RECORD_FIELD_DEF@30..39 515 [email protected]
516 [email protected] 516 [email protected]
517 [email protected] "field" 517 [email protected] "field"
518 [email protected] ":" 518 [email protected] ":"
@@ -625,7 +625,7 @@ fn test_tt_to_stmts() {
625 r#"[email protected] 625 r#"[email protected]
626 [email protected] 626 [email protected]
627 [email protected] "let" 627 [email protected] "let"
628 BIN[email protected] 628 IDENT[email protected]
629 [email protected] 629 [email protected]
630 [email protected] "a" 630 [email protected] "a"
631 [email protected] "=" 631 [email protected] "="
@@ -1116,7 +1116,7 @@ fn test_vec() {
1116 [email protected] "{" 1116 [email protected] "{"
1117 [email protected] 1117 [email protected]
1118 [email protected] "let" 1118 [email protected] "let"
1119 BIN[email protected] 1119 IDENT[email protected]
1120 [email protected] "mut" 1120 [email protected] "mut"
1121 [email protected] 1121 [email protected]
1122 [email protected] "v" 1122 [email protected] "v"
@@ -1467,7 +1467,7 @@ macro_rules! quick_error {
1467 buf [ ] 1467 buf [ ]
1468 queue [ ] 1468 queue [ ]
1469 ) => { 1469 ) => {
1470 quick_error!(ENUM_DEFINITION [enum $name $( #[$meta] )*] 1470 quick_error!(ENUMINITION [enum $name $( #[$meta] )*]
1471 body [] 1471 body []
1472 queue [$( 1472 queue [$(
1473 $( #[$imeta] )* 1473 $( #[$imeta] )*
@@ -1489,7 +1489,7 @@ quick_error ! (SORT [enum Wrapped # [derive (Debug)]] items [
1489"#, 1489"#,
1490 ); 1490 );
1491 1491
1492 assert_eq!(expanded.to_string(), "quick_error ! (ENUM_DEFINITION [enum Wrapped # [derive (Debug)]] body [] queue [=> One : UNIT [] => Two : TUPLE [s : String]]) ;"); 1492 assert_eq!(expanded.to_string(), "quick_error ! (ENUMINITION [enum Wrapped # [derive (Debug)]] body [] queue [=> One : UNIT [] => Two : TUPLE [s : String]]) ;");
1493} 1493}
1494 1494
1495#[test] 1495#[test]