Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/nameres/collector.rs')
-rw-r--r--crates/hir_def/src/nameres/collector.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index 95a50d942e..8e6b5283f1 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -504,10 +504,8 @@ impl DefCollector<'_> {
} else {
PathKind::Abs
};
- let path = ModPath::from_segments(
- path_kind.clone(),
- [krate.clone(), name![prelude], edition].into_iter(),
- );
+ let path =
+ ModPath::from_segments(path_kind, [krate.clone(), name![prelude], edition].into_iter());
// Fall back to the older `std::prelude::v1` for compatibility with Rust <1.52.0
// FIXME remove this fallback
let fallback_path =
@@ -570,7 +568,7 @@ impl DefCollector<'_> {
let proc_macro_id =
ProcMacroLoc { container: module_id, id, expander, kind }.intern(self.db);
- self.define_proc_macro(def.name.clone(), proc_macro_id.into());
+ self.define_proc_macro(def.name.clone(), proc_macro_id);
if let ProcMacroKind::CustomDerive { helpers } = def.kind {
self.def_map
.exported_derives