aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-12 13:25:59 +0000
committerGitHub <[email protected]>2019-12-12 13:25:59 +0000
commitd8dba7fbe587ba5fb6cfe939083ccd92c61f5827 (patch)
treec50b695604c7d418fc107775b9ec3a6845062751 /crates/ra_hir_ty
parentb2638fcd2cc847e008e1dd7f1739283813b94026 (diff)
parent7b0644d81e52d00a7a6795b187f356213ff68225 (diff)
Merge #2537
2537: Switch to the new location for impls r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r--crates/ra_hir_ty/src/method_resolution.rs6
-rw-r--r--crates/ra_hir_ty/src/traits/chalk.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/method_resolution.rs b/crates/ra_hir_ty/src/method_resolution.rs
index 7220d6e0a..848e306e9 100644
--- a/crates/ra_hir_ty/src/method_resolution.rs
+++ b/crates/ra_hir_ty/src/method_resolution.rs
@@ -6,8 +6,8 @@ use std::sync::Arc;
6 6
7use arrayvec::ArrayVec; 7use arrayvec::ArrayVec;
8use hir_def::{ 8use hir_def::{
9 lang_item::LangItemTarget, resolver::Resolver, type_ref::Mutability, AssocItemId, AstItemDef, 9 lang_item::LangItemTarget, resolver::Resolver, type_ref::Mutability, AssocItemId, FunctionId,
10 FunctionId, HasModule, ImplId, Lookup, TraitId, 10 HasModule, ImplId, Lookup, TraitId,
11}; 11};
12use hir_expand::name::Name; 12use hir_expand::name::Name;
13use ra_db::CrateId; 13use ra_db::CrateId;
@@ -134,7 +134,7 @@ impl Ty {
134 LangItemTarget::ImplBlockId(it) => Some(it), 134 LangItemTarget::ImplBlockId(it) => Some(it),
135 _ => None, 135 _ => None,
136 }) 136 })
137 .map(|it| it.module(db).krate) 137 .map(|it| it.lookup(db).container.krate)
138 .collect(); 138 .collect();
139 Some(res) 139 Some(res)
140 } 140 }
diff --git a/crates/ra_hir_ty/src/traits/chalk.rs b/crates/ra_hir_ty/src/traits/chalk.rs
index 1e7ff93d5..ff299f511 100644
--- a/crates/ra_hir_ty/src/traits/chalk.rs
+++ b/crates/ra_hir_ty/src/traits/chalk.rs
@@ -673,7 +673,7 @@ fn impl_block_datum(
673 let bound_vars = Substs::bound_vars(&generic_params); 673 let bound_vars = Substs::bound_vars(&generic_params);
674 let trait_ref = trait_ref.subst(&bound_vars); 674 let trait_ref = trait_ref.subst(&bound_vars);
675 let trait_ = trait_ref.trait_; 675 let trait_ = trait_ref.trait_;
676 let impl_type = if impl_id.module(db).krate == krate { 676 let impl_type = if impl_id.lookup(db).container.krate == krate {
677 chalk_rust_ir::ImplType::Local 677 chalk_rust_ir::ImplType::Local
678 } else { 678 } else {
679 chalk_rust_ir::ImplType::External 679 chalk_rust_ir::ImplType::External