avoid ICE when extracting closure-kind-ty from a canonicalized value
In such a case, the `Infer` is converted to a `Bound`
This commit is contained in:
parent
0b58d9d124
commit
bec0902535
1 changed files with 3 additions and 1 deletions
|
|
@ -2199,7 +2199,9 @@ impl<'tcx> TyS<'tcx> {
|
|||
_ => bug!("cannot convert type `{:?}` to a closure kind", self),
|
||||
},
|
||||
|
||||
Infer(_) => None,
|
||||
// "Bound" types appear in canonical queries when the
|
||||
// closure type is not yet known
|
||||
Bound(..) | Infer(_) => None,
|
||||
|
||||
Error => Some(ty::ClosureKind::Fn),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue