We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8eed8ed commit 3982ac2Copy full SHA for 3982ac2
compiler/rustc_typeck/src/check/expectation.rs
@@ -104,8 +104,8 @@ impl<'a, 'tcx> Expectation<'tcx> {
104
/// for the program to type-check). `only_has_type` will return
105
/// such a constraint, if it exists.
106
pub(super) fn only_has_type(self, fcx: &FnCtxt<'a, 'tcx>) -> Option<Ty<'tcx>> {
107
- match self.resolve(fcx) {
108
- ExpectHasType(ty) => Some(ty),
+ match self {
+ ExpectHasType(ty) => Some(fcx.resolve_vars_if_possible(ty)),
109
NoExpectation | ExpectCastableToType(_) | ExpectRvalueLikeUnsized(_) | IsLast(_) => {
110
None
111
}
0 commit comments