提交 716f75b1 编写于 作者: N Niko Matsakis

traits: prefer `ClosureSubsts` to `InferCtxt::closure_kind`

上级 decf3d33
......@@ -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 @@ fn evaluate_predicate_recursively<'o>(&mut self,
}
}
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册