diff options
-rw-r--r-- | Cargo.lock | 1 | ||||
-rw-r--r-- | crates/ra_macros/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_macros/src/mbe_expander.rs | 6 |
3 files changed, 5 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock index b6367bf30..b48721622 100644 --- a/Cargo.lock +++ b/Cargo.lock | |||
@@ -1022,6 +1022,7 @@ dependencies = [ | |||
1022 | name = "ra_macros" | 1022 | name = "ra_macros" |
1023 | version = "0.1.0" | 1023 | version = "0.1.0" |
1024 | dependencies = [ | 1024 | dependencies = [ |
1025 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", | ||
1025 | "smol_str 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", | 1026 | "smol_str 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", |
1026 | ] | 1027 | ] |
1027 | 1028 | ||
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" | |||
5 | authors = ["Aleksey Kladov <[email protected]>"] | 5 | authors = ["Aleksey Kladov <[email protected]>"] |
6 | 6 | ||
7 | [dependencies] | 7 | [dependencies] |
8 | rustc_hash = "1.0.0" | 8 | rustc-hash = "1.0.0" |
9 | smol_str = "0.1.9" | 9 | 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<tt::Subtre | |||
8 | } | 8 | } |
9 | 9 | ||
10 | fn expand_rule(rule: &mbe::Rule, input: &tt::Subtree) -> Option<tt::Subtree> { | 10 | fn expand_rule(rule: &mbe::Rule, input: &tt::Subtree) -> Option<tt::Subtree> { |
11 | let bidings = match_lhs(&rule.lhs, input)?; | 11 | let bindings = match_lhs(&rule.lhs, input)?; |
12 | expand_rhs(&rule.rhs, &bindings) | 12 | expand_rhs(&rule.rhs, &bindings) |
13 | } | 13 | } |
14 | 14 | ||
@@ -17,10 +17,10 @@ struct Bindings { | |||
17 | inner: FxHashMap<SmolStr, tt::TokenTree>, | 17 | inner: FxHashMap<SmolStr, tt::TokenTree>, |
18 | } | 18 | } |
19 | 19 | ||
20 | fn match_lhs(pattern: &mbe::TokenTree, input: &tt::Subtree) -> Option<Bindings> { | 20 | fn match_lhs(pattern: &mbe::Subtree, input: &tt::Subtree) -> Option<Bindings> { |
21 | Some(Bindings::default()) | 21 | Some(Bindings::default()) |
22 | } | 22 | } |
23 | 23 | ||
24 | fn expand_rhs(template: &mbe::TokenTree, bindings: &Bindings) -> Option<tt::Subtree> { | 24 | fn expand_rhs(template: &mbe::Subtree, bindings: &Bindings) -> Option<tt::Subtree> { |
25 | None | 25 | None |
26 | } | 26 | } |