From 2def5b4e6f05241862af30d27a547c562693f678 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 31 Jan 2019 13:59:39 +0300 Subject: more expand boilerplate --- crates/ra_macros/Cargo.toml | 2 +- crates/ra_macros/src/mbe_expander.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/ra_macros/Cargo.toml b/crates/ra_macros/Cargo.toml index 21c128442..7d3cb055c 100644 --- a/crates/ra_macros/Cargo.toml +++ b/crates/ra_macros/Cargo.toml @@ -5,5 +5,5 @@ version = "0.1.0" authors = ["Aleksey Kladov "] [dependencies] -rustc_hash = "1.0.0" +rustc-hash = "1.0.0" smol_str = "0.1.9" diff --git a/crates/ra_macros/src/mbe_expander.rs b/crates/ra_macros/src/mbe_expander.rs index 9436baa28..545bd2002 100644 --- a/crates/ra_macros/src/mbe_expander.rs +++ b/crates/ra_macros/src/mbe_expander.rs @@ -8,7 +8,7 @@ pub fn exapnd(rules: &mbe::MacroRules, input: &tt::Subtree) -> Option Option { - let bidings = match_lhs(&rule.lhs, input)?; + let bindings = match_lhs(&rule.lhs, input)?; expand_rhs(&rule.rhs, &bindings) } @@ -17,10 +17,10 @@ struct Bindings { inner: FxHashMap, } -fn match_lhs(pattern: &mbe::TokenTree, input: &tt::Subtree) -> Option { +fn match_lhs(pattern: &mbe::Subtree, input: &tt::Subtree) -> Option { Some(Bindings::default()) } -fn expand_rhs(template: &mbe::TokenTree, bindings: &Bindings) -> Option { +fn expand_rhs(template: &mbe::Subtree, bindings: &Bindings) -> Option { None } -- cgit v1.2.3