aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/method_resolution.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-05 14:05:35 +0100
committerGitHub <[email protected]>2021-04-05 14:05:35 +0100
commit8a18f23df068dd8e3cfaea15391610dbda418aab (patch)
treeb2520aac7015ecc4062720ce88be5c19f16a0177 /crates/hir_ty/src/method_resolution.rs
parentc2be91dcd826e1529ac6ac431b3f871ec72abebc (diff)
parent72c54c53cdc543eab40fc5d4593e6a7f57c94755 (diff)
Merge #8342
8342: Rename `TyKind::Unknown` and `TyKind::ForeignType` (Chalk move) r=flodiebold a=lnicola CC #8313 Co-authored-by: LaurenČ›iu Nicola <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r--crates/hir_ty/src/method_resolution.rs6
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 0e4a620b6..6ace970d1 100644
--- a/crates/hir_ty/src/method_resolution.rs
+++ b/crates/hir_ty/src/method_resolution.rs
@@ -55,7 +55,7 @@ impl TyFingerprint {
55 TyKind::Adt(AdtId(adt), _) => TyFingerprint::Adt(adt), 55 TyKind::Adt(AdtId(adt), _) => TyFingerprint::Adt(adt),
56 TyKind::Tuple(cardinality, _) => TyFingerprint::Tuple(cardinality), 56 TyKind::Tuple(cardinality, _) => TyFingerprint::Tuple(cardinality),
57 TyKind::Raw(mutability, ..) => TyFingerprint::RawPtr(mutability), 57 TyKind::Raw(mutability, ..) => TyFingerprint::RawPtr(mutability),
58 TyKind::ForeignType(alias_id, ..) => TyFingerprint::ForeignType(alias_id), 58 TyKind::Foreign(alias_id, ..) => TyFingerprint::ForeignType(alias_id),
59 TyKind::Function(FnPointer { num_args, sig, .. }) => { 59 TyKind::Function(FnPointer { num_args, sig, .. }) => {
60 TyFingerprint::FnPtr(num_args, sig) 60 TyFingerprint::FnPtr(num_args, sig)
61 } 61 }
@@ -246,7 +246,7 @@ impl Ty {
246 TyKind::Adt(AdtId(def_id), _) => { 246 TyKind::Adt(AdtId(def_id), _) => {
247 return mod_to_crate_ids(def_id.module(db.upcast())); 247 return mod_to_crate_ids(def_id.module(db.upcast()));
248 } 248 }
249 TyKind::ForeignType(id) => { 249 TyKind::Foreign(id) => {
250 return mod_to_crate_ids( 250 return mod_to_crate_ids(
251 from_foreign_def_id(*id).lookup(db.upcast()).module(db.upcast()), 251 from_foreign_def_id(*id).lookup(db.upcast()).module(db.upcast()),
252 ); 252 );
@@ -742,7 +742,7 @@ fn fallback_bound_vars(s: Substitution, num_vars_to_keep: usize) -> Substitution
742 &mut |ty, binders| { 742 &mut |ty, binders| {
743 if let TyKind::BoundVar(bound) = ty.kind(&Interner) { 743 if let TyKind::BoundVar(bound) = ty.kind(&Interner) {
744 if bound.index >= num_vars_to_keep && bound.debruijn >= binders { 744 if bound.index >= num_vars_to_keep && bound.debruijn >= binders {
745 TyKind::Unknown.intern(&Interner) 745 TyKind::Error.intern(&Interner)
746 } else { 746 } else {
747 ty 747 ty
748 } 748 }