diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-25 15:47:46 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-25 15:47:46 +0100 |
commit | 3a1369955800752ed3a24f52ed2eb6be7ddf22a4 (patch) | |
tree | 047556acaa4ff4044d2900902810a3555c6eb2c1 /crates/hir_ty/src/infer.rs | |
parent | 35db5e99f6f982f4257e88d13cbecca250b05efe (diff) | |
parent | 28ca37175572403edeb92324d251fbceb4c2487f (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.rs | 2 |
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 | } |