diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-22 17:11:48 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-22 17:11:48 +0000 |
commit | f301da3c3d1c73dd9d438cb0736e23430287dba7 (patch) | |
tree | 586329f5641c520ef61d626736e492e33b227e25 /crates/hir_ty/src/method_resolution.rs | |
parent | b982db88bed5e94913460dce7cd2b728ba925475 (diff) | |
parent | 3de8f57c51192fa8e57713a3580c2bcc6907a194 (diff) |
Merge #7399
7399: Make `ModuleId`'s `krate` field private and audit uses r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index f06aeeb42..a302456b0 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs | |||
@@ -248,12 +248,12 @@ impl Ty { | |||
248 | let lang_item_targets = match self { | 248 | let lang_item_targets = match self { |
249 | Ty::Apply(a_ty) => match a_ty.ctor { | 249 | Ty::Apply(a_ty) => match a_ty.ctor { |
250 | TypeCtor::Adt(def_id) => { | 250 | TypeCtor::Adt(def_id) => { |
251 | return Some(std::iter::once(def_id.module(db.upcast()).krate).collect()) | 251 | return Some(std::iter::once(def_id.module(db.upcast()).krate()).collect()) |
252 | } | 252 | } |
253 | TypeCtor::ForeignType(type_alias_id) => { | 253 | TypeCtor::ForeignType(type_alias_id) => { |
254 | return Some( | 254 | return Some( |
255 | std::iter::once( | 255 | std::iter::once( |
256 | type_alias_id.lookup(db.upcast()).module(db.upcast()).krate, | 256 | type_alias_id.lookup(db.upcast()).module(db.upcast()).krate(), |
257 | ) | 257 | ) |
258 | .collect(), | 258 | .collect(), |
259 | ) | 259 | ) |
@@ -280,7 +280,7 @@ impl Ty { | |||
280 | LangItemTarget::ImplDefId(it) => Some(it), | 280 | LangItemTarget::ImplDefId(it) => Some(it), |
281 | _ => None, | 281 | _ => None, |
282 | }) | 282 | }) |
283 | .map(|it| it.lookup(db.upcast()).container.module(db.upcast()).krate) | 283 | .map(|it| it.lookup(db.upcast()).container.module(db.upcast()).krate()) |
284 | .collect(); | 284 | .collect(); |
285 | Some(res) | 285 | Some(res) |
286 | } | 286 | } |