aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-25 15:47:46 +0100
committerGitHub <[email protected]>2021-05-25 15:47:46 +0100
commit3a1369955800752ed3a24f52ed2eb6be7ddf22a4 (patch)
tree047556acaa4ff4044d2900902810a3555c6eb2c1 /crates/hir_ty/src/infer.rs
parent35db5e99f6f982f4257e88d13cbecca250b05efe (diff)
parent28ca37175572403edeb92324d251fbceb4c2487f (diff)
Merge #8991
8991: Consider trait to be in scope for trait-impls r=Veykril a=Veykril Fixes #8912 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer.rs')
-rw-r--r--crates/hir_ty/src/infer.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs
index edb65622f..164e85050 100644
--- a/crates/hir_ty/src/infer.rs
+++ b/crates/hir_ty/src/infer.rs
@@ -578,10 +578,12 @@ impl<'a> InferenceContext<'a> {
578 } 578 }
579 579
580 fn resolve_ops_try_ok(&self) -> Option<TypeAliasId> { 580 fn resolve_ops_try_ok(&self) -> Option<TypeAliasId> {
581 // FIXME resolve via lang_item once try v2 is stable
581 let path = path![core::ops::Try]; 582 let path = path![core::ops::Try];
582 let trait_ = self.resolver.resolve_known_trait(self.db.upcast(), &path)?; 583 let trait_ = self.resolver.resolve_known_trait(self.db.upcast(), &path)?;
583 let trait_data = self.db.trait_data(trait_); 584 let trait_data = self.db.trait_data(trait_);
584 trait_data 585 trait_data
586 // FIXME remove once try v2 is stable
585 .associated_type_by_name(&name![Ok]) 587 .associated_type_by_name(&name![Ok])
586 .or_else(|| trait_data.associated_type_by_name(&name![Output])) 588 .or_else(|| trait_data.associated_type_by_name(&name![Output]))
587 } 589 }