diff options
author | Seivan Heidari <[email protected]> | 2019-10-31 08:43:20 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-10-31 08:43:20 +0000 |
commit | 8edda0e7b164009d6c03bb3d4be603fb38ad2e2a (patch) | |
tree | 744cf81075d394e2f9c06afb07642a2601800dda /crates/ra_mbe/src | |
parent | 49562d36b97ddde34cf7585a8c2e8f232519b657 (diff) | |
parent | d067afb064a7fa67b172abf561b7d80740cd6f18 (diff) |
Merge branch 'master' into feature/themes
Diffstat (limited to 'crates/ra_mbe/src')
-rw-r--r-- | crates/ra_mbe/src/mbe_expander/matcher.rs | 3 | ||||
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/ra_mbe/src/mbe_expander/matcher.rs index 0548e8512..33b9d483d 100644 --- a/crates/ra_mbe/src/mbe_expander/matcher.rs +++ b/crates/ra_mbe/src/mbe_expander/matcher.rs | |||
@@ -123,7 +123,6 @@ fn match_subtree( | |||
123 | } | 123 | } |
124 | None => bindings.push_optional(name), | 124 | None => bindings.push_optional(name), |
125 | } | 125 | } |
126 | () | ||
127 | } | 126 | } |
128 | Op::Repeat { subtree, kind, separator } => { | 127 | Op::Repeat { subtree, kind, separator } => { |
129 | match_repeat(bindings, subtree, kind, separator, src)? | 128 | match_repeat(bindings, subtree, kind, separator, src)? |
@@ -159,7 +158,7 @@ impl<'a> TtIter<'a> { | |||
159 | pub(crate) fn expect_lifetime(&mut self) -> Result<&tt::Ident, ()> { | 158 | pub(crate) fn expect_lifetime(&mut self) -> Result<&tt::Ident, ()> { |
160 | let ident = self.expect_ident()?; | 159 | let ident = self.expect_ident()?; |
161 | // check if it start from "`" | 160 | // check if it start from "`" |
162 | if ident.text.chars().next() != Some('\'') { | 161 | if !ident.text.starts_with('\'') { |
163 | return Err(()); | 162 | return Err(()); |
164 | } | 163 | } |
165 | Ok(ident) | 164 | Ok(ident) |
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index 1b543c84b..592fcf527 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -383,7 +383,7 @@ mod tests { | |||
383 | "#, | 383 | "#, |
384 | ); | 384 | ); |
385 | let expansion = expand(&rules, "literals!(foo);"); | 385 | let expansion = expand(&rules, "literals!(foo);"); |
386 | let tts = &[expansion.clone().into()]; | 386 | let tts = &[expansion.into()]; |
387 | let buffer = tt::buffer::TokenBuffer::new(tts); | 387 | let buffer = tt::buffer::TokenBuffer::new(tts); |
388 | let mut tt_src = SubtreeTokenSource::new(&buffer); | 388 | let mut tt_src = SubtreeTokenSource::new(&buffer); |
389 | let mut tokens = vec![]; | 389 | let mut tokens = vec![]; |