Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/chalk_db.rs')
-rw-r--r--crates/hir-ty/src/chalk_db.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/crates/hir-ty/src/chalk_db.rs b/crates/hir-ty/src/chalk_db.rs
index 24deb00b38..dc527000a1 100644
--- a/crates/hir-ty/src/chalk_db.rs
+++ b/crates/hir-ty/src/chalk_db.rs
@@ -289,16 +289,17 @@ impl chalk_solve::RustIrDatabase<Interner> for ChalkContext<'_> {
chalk_ir::Binders::new(binders, bound)
}
crate::ImplTraitId::AsyncBlockTypeImplTrait(..) => {
- if let Some((future_trait, future_output)) =
- self.db
- .lang_item(self.krate, LangItem::Future)
- .and_then(|item| item.as_trait())
- .and_then(|trait_| {
- let alias = self.db.trait_items(trait_).associated_type_by_name(
- &Name::new_symbol_root(sym::Output.clone()),
- )?;
- Some((trait_, alias))
- })
+ if let Some((future_trait, future_output)) = self
+ .db
+ .lang_item(self.krate, LangItem::Future)
+ .and_then(|item| item.as_trait())
+ .and_then(|trait_| {
+ let alias = self
+ .db
+ .trait_items(trait_)
+ .associated_type_by_name(&Name::new_symbol_root(sym::Output))?;
+ Some((trait_, alias))
+ })
{
// Making up Symbol’s value as variable is void: AsyncBlock<T>:
//