Return type is bound too

This commit is contained in:
Jack Huey 2020-06-03 16:14:18 -04:00
parent 890cef635c
commit d63195b0bc

View file

@ -187,8 +187,12 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t
.map(|t| t.subst(self.tcx, &bound_vars).lower_into(&self.interner))
.collect();
let return_type =
sig.output().skip_binder().subst(self.tcx, &bound_vars).lower_into(&self.interner);
let return_type = sig
.output()
.no_bound_vars()
.expect("FIXME(chalk): late-bound fn parameters not supported in chalk")
.subst(self.tcx, &bound_vars)
.lower_into(&self.interner);
let bound =
chalk_solve::rust_ir::FnDefDatumBound { argument_types, where_clauses, return_type };