diff options
Diffstat (limited to 'crates/ra_mbe/src/subtree_source.rs')
-rw-r--r-- | crates/ra_mbe/src/subtree_source.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/ra_mbe/src/subtree_source.rs index 7ef45f6dc..b841c39d3 100644 --- a/crates/ra_mbe/src/subtree_source.rs +++ b/crates/ra_mbe/src/subtree_source.rs | |||
@@ -70,11 +70,11 @@ impl<'a> SubtreeTokenSource<'a> { | |||
70 | } | 70 | } |
71 | Some(tt::TokenTree::Subtree(subtree)) => { | 71 | Some(tt::TokenTree::Subtree(subtree)) => { |
72 | self.cached_cursor.set(cursor.subtree().unwrap()); | 72 | self.cached_cursor.set(cursor.subtree().unwrap()); |
73 | cached.push(Some(convert_delim(subtree.delimiter, false))); | 73 | cached.push(Some(convert_delim(subtree.delimiter_kind(), false))); |
74 | } | 74 | } |
75 | None => { | 75 | None => { |
76 | if let Some(subtree) = cursor.end() { | 76 | if let Some(subtree) = cursor.end() { |
77 | cached.push(Some(convert_delim(subtree.delimiter, true))); | 77 | cached.push(Some(convert_delim(subtree.delimiter_kind(), true))); |
78 | self.cached_cursor.set(cursor.bump()); | 78 | self.cached_cursor.set(cursor.bump()); |
79 | } | 79 | } |
80 | } | 80 | } |
@@ -114,12 +114,12 @@ impl<'a> TokenSource for SubtreeTokenSource<'a> { | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | fn convert_delim(d: tt::Delimiter, closing: bool) -> TtToken { | 117 | fn convert_delim(d: Option<tt::DelimiterKind>, closing: bool) -> TtToken { |
118 | let (kinds, texts) = match d { | 118 | let (kinds, texts) = match d { |
119 | tt::Delimiter::Parenthesis => ([T!['('], T![')']], "()"), | 119 | Some(tt::DelimiterKind::Parenthesis) => ([T!['('], T![')']], "()"), |
120 | tt::Delimiter::Brace => ([T!['{'], T!['}']], "{}"), | 120 | Some(tt::DelimiterKind::Brace) => ([T!['{'], T!['}']], "{}"), |
121 | tt::Delimiter::Bracket => ([T!['['], T![']']], "[]"), | 121 | Some(tt::DelimiterKind::Bracket) => ([T!['['], T![']']], "[]"), |
122 | tt::Delimiter::None => ([L_DOLLAR, R_DOLLAR], ""), | 122 | None => ([L_DOLLAR, R_DOLLAR], ""), |
123 | }; | 123 | }; |
124 | 124 | ||
125 | let idx = closing as usize; | 125 | let idx = closing as usize; |