aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2019-12-20 20:14:30 +0000
committerkjeremy <[email protected]>2019-12-20 20:14:30 +0000
commit0d5d63a80ea08f2af439bcc72fff9b24d144c70d (patch)
tree688102f3cfdec260f5164d60f0bb95e33ebe9674 /crates/ra_hir_expand
parent9467f81c588bf7a62ec882f293e0870c187b368b (diff)
Clippy lints
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r--crates/ra_hir_expand/src/builtin_macro.rs2
-rw-r--r--crates/ra_hir_expand/src/db.rs9
2 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs
index 1749b491b..857f8a444 100644
--- a/crates/ra_hir_expand/src/builtin_macro.rs
+++ b/crates/ra_hir_expand/src/builtin_macro.rs
@@ -138,7 +138,7 @@ fn to_col_number(db: &dyn AstDatabase, file: HirFileId, pos: TextUnit) -> usize
138 if c == '\n' { 138 if c == '\n' {
139 break; 139 break;
140 } 140 }
141 col_num = col_num + 1; 141 col_num += 1;
142 } 142 }
143 col_num 143 col_num
144} 144}
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs
index f68aca789..42e599fec 100644
--- a/crates/ra_hir_expand/src/db.rs
+++ b/crates/ra_hir_expand/src/db.rs
@@ -93,12 +93,11 @@ pub(crate) fn macro_def(
93 Some(Arc::new((TokenExpander::MacroRules(rules), tmap))) 93 Some(Arc::new((TokenExpander::MacroRules(rules), tmap)))
94 } 94 }
95 MacroDefKind::BuiltIn(expander) => { 95 MacroDefKind::BuiltIn(expander) => {
96 Some(Arc::new((TokenExpander::Builtin(expander.clone()), mbe::TokenMap::default()))) 96 Some(Arc::new((TokenExpander::Builtin(expander), mbe::TokenMap::default())))
97 }
98 MacroDefKind::BuiltInDerive(expander) => {
99 Some(Arc::new((TokenExpander::BuiltinDerive(expander), mbe::TokenMap::default())))
97 } 100 }
98 MacroDefKind::BuiltInDerive(expander) => Some(Arc::new((
99 TokenExpander::BuiltinDerive(expander.clone()),
100 mbe::TokenMap::default(),
101 ))),
102 } 101 }
103} 102}
104 103