Skip to content

Commit

Permalink
Return type is bound too
Browse files Browse the repository at this point in the history
  • Loading branch information
jackh726 committed Jun 19, 2020
1 parent 890cef6 commit d63195b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/librustc_traits/chalk/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit d63195b

Please sign in to comment.