aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-13 15:31:49 +0100
committerGitHub <[email protected]>2020-08-13 15:31:49 +0100
commite9926948ca267932ccc1341388bfd1b3fa88a001 (patch)
treecc4b797cb39a40b59e9e3d37178e8a1907f12358 /crates/ra_hir/src/code_model.rs
parent902f74c2697cc2a50de9067845814a2a852fccfd (diff)
parent50f8c1ebf23f634b68529603a917e3feeda457fa (diff)
Merge #5747
5747: Rename crate r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r--crates/ra_hir/src/code_model.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 98724c146..8ffb9e99b 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -2,6 +2,7 @@
2use std::{iter, sync::Arc}; 2use std::{iter, sync::Arc};
3 3
4use arrayvec::ArrayVec; 4use arrayvec::ArrayVec;
5use base_db::{CrateId, Edition, FileId};
5use either::Either; 6use either::Either;
6use hir_def::{ 7use hir_def::{
7 adt::ReprKind, 8 adt::ReprKind,
@@ -30,7 +31,6 @@ use hir_ty::{
30 method_resolution, ApplicationTy, CallableDefId, Canonical, FnSig, GenericPredicate, 31 method_resolution, ApplicationTy, CallableDefId, Canonical, FnSig, GenericPredicate,
31 InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor, 32 InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor,
32}; 33};
33use ra_db::{CrateId, Edition, FileId};
34use rustc_hash::FxHashSet; 34use rustc_hash::FxHashSet;
35use stdx::impl_from; 35use stdx::impl_from;
36use syntax::{ 36use syntax::{
@@ -815,7 +815,7 @@ pub struct MacroDef {
815impl MacroDef { 815impl MacroDef {
816 /// FIXME: right now, this just returns the root module of the crate that 816 /// FIXME: right now, this just returns the root module of the crate that
817 /// defines this macro. The reasons for this is that macros are expanded 817 /// defines this macro. The reasons for this is that macros are expanded
818 /// early, in `ra_hir_expand`, where modules simply do not exist yet. 818 /// early, in `hir_expand`, where modules simply do not exist yet.
819 pub fn module(self, db: &dyn HirDatabase) -> Option<Module> { 819 pub fn module(self, db: &dyn HirDatabase) -> Option<Module> {
820 let krate = self.id.krate?; 820 let krate = self.id.krate?;
821 let module_id = db.crate_def_map(krate).root; 821 let module_id = db.crate_def_map(krate).root;