aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-21 06:12:36 +0000
committerGitHub <[email protected]>2019-12-21 06:12:36 +0000
commit1cbef27ff857803fbee123e6730b83e1ef154f6c (patch)
tree7d45ce377fb8f4c7019bb74381228b94f397110f /crates/ra_hir_expand
parent6eab968c601637361e8fbd1ee93ded1b0d967bee (diff)
parent0d5d63a80ea08f2af439bcc72fff9b24d144c70d (diff)
Merge #2625
2625: Clippy lints r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
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 d86445abf..2e12e126f 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