traits: prefer ClosureSubsts
to InferCtxt::closure_kind
This commit is contained in:
parent
decf3d33d0
commit
716f75b1b8
2 changed files with 4 additions and 4 deletions
|
@ -438,8 +438,8 @@ fn process_predicate<'a, 'gcx, 'tcx>(
|
|||
}
|
||||
}
|
||||
|
||||
ty::Predicate::ClosureKind(closure_def_id, _closure_substs, kind) => {
|
||||
match selcx.infcx().closure_kind(closure_def_id) {
|
||||
ty::Predicate::ClosureKind(closure_def_id, closure_substs, kind) => {
|
||||
match closure_substs.opt_closure_kind(closure_def_id, selcx.tcx()) {
|
||||
Some(closure_kind) => {
|
||||
if closure_kind.extends(kind) {
|
||||
Ok(Some(vec![]))
|
||||
|
|
|
@ -718,8 +718,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
ty::Predicate::ClosureKind(closure_def_id, _closure_substs, kind) => {
|
||||
match self.infcx.closure_kind(closure_def_id) {
|
||||
ty::Predicate::ClosureKind(closure_def_id, closure_substs, kind) => {
|
||||
match closure_substs.opt_closure_kind(closure_def_id, self.tcx()) {
|
||||
Some(closure_kind) => {
|
||||
if closure_kind.extends(kind) {
|
||||
EvaluatedToOk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue