diff options
author | Jonas Schievink <[email protected]> | 2021-01-22 17:09:55 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-01-22 17:09:55 +0000 |
commit | 3de8f57c51192fa8e57713a3580c2bcc6907a194 (patch) | |
tree | f062bb33b2cfe9983605d6957eb56ddc21af2e93 /crates/hir_ty/src/traits | |
parent | e73cc8b4abed6e6f5d801d0032070fa9fc662ec3 (diff) |
Make `ModuleId`'s `krate` field private
Diffstat (limited to 'crates/hir_ty/src/traits')
-rw-r--r-- | crates/hir_ty/src/traits/chalk.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs index 2196af677..cfb756158 100644 --- a/crates/hir_ty/src/traits/chalk.rs +++ b/crates/hir_ty/src/traits/chalk.rs | |||
@@ -426,7 +426,7 @@ pub(crate) fn trait_datum_query( | |||
426 | let bound_vars = Substs::bound_vars(&generic_params, DebruijnIndex::INNERMOST); | 426 | let bound_vars = Substs::bound_vars(&generic_params, DebruijnIndex::INNERMOST); |
427 | let flags = rust_ir::TraitFlags { | 427 | let flags = rust_ir::TraitFlags { |
428 | auto: trait_data.auto, | 428 | auto: trait_data.auto, |
429 | upstream: trait_.lookup(db.upcast()).container.module(db.upcast()).krate != krate, | 429 | upstream: trait_.lookup(db.upcast()).container.module(db.upcast()).krate() != krate, |
430 | non_enumerable: true, | 430 | non_enumerable: true, |
431 | coinductive: false, // only relevant for Chalk testing | 431 | coinductive: false, // only relevant for Chalk testing |
432 | // FIXME: set these flags correctly | 432 | // FIXME: set these flags correctly |
@@ -549,7 +549,7 @@ fn impl_def_datum( | |||
549 | let generic_params = generics(db.upcast(), impl_id.into()); | 549 | let generic_params = generics(db.upcast(), impl_id.into()); |
550 | let bound_vars = Substs::bound_vars(&generic_params, DebruijnIndex::INNERMOST); | 550 | let bound_vars = Substs::bound_vars(&generic_params, DebruijnIndex::INNERMOST); |
551 | let trait_ = trait_ref.trait_; | 551 | let trait_ = trait_ref.trait_; |
552 | let impl_type = if impl_id.lookup(db.upcast()).container.module(db.upcast()).krate == krate { | 552 | let impl_type = if impl_id.lookup(db.upcast()).container.module(db.upcast()).krate() == krate { |
553 | rust_ir::ImplType::Local | 553 | rust_ir::ImplType::Local |
554 | } else { | 554 | } else { |
555 | rust_ir::ImplType::External | 555 | rust_ir::ImplType::External |