diff options
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/nameres/raw.rs | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index 6b253ac40..ef7dc6ebe 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -166,7 +166,7 @@ where | |||
166 | // In Rust, `#[macro_export]` macros are unconditionally visible at the | 166 | // In Rust, `#[macro_export]` macros are unconditionally visible at the |
167 | // crate root, even if the parent modules is **not** visible. | 167 | // crate root, even if the parent modules is **not** visible. |
168 | if export { | 168 | if export { |
169 | self.update(self.def_map.root, None, &[(name.clone(), Resolution::from_macro(macro_))]); | 169 | self.update(self.def_map.root, None, &[(name, Resolution::from_macro(macro_))]); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | 172 | ||
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index 8bf883ac2..29aaddbf1 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs | |||
@@ -36,10 +36,7 @@ type ImportSource = Either<ast::UseTree, ast::ExternCrateItem>; | |||
36 | 36 | ||
37 | impl ImportSourcePtr { | 37 | impl ImportSourcePtr { |
38 | fn to_node(self, file: &SourceFile) -> ImportSource { | 38 | fn to_node(self, file: &SourceFile) -> ImportSource { |
39 | self.map( | 39 | self.map(|ptr| ptr.to_node(file.syntax()), |ptr| ptr.to_node(file.syntax())) |
40 | |ptr| ptr.to_node(file.syntax()).to_owned(), | ||
41 | |ptr| ptr.to_node(file.syntax()).to_owned(), | ||
42 | ) | ||
43 | } | 40 | } |
44 | } | 41 | } |
45 | 42 | ||