We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da0380b commit 6210ed3Copy full SHA for 6210ed3
compiler/rustc_hir_typeck/src/expectation.rs
@@ -1,5 +1,5 @@
1
use rustc_middle::ty::{self, Ty};
2
-use rustc_span::Span;
+use rustc_span::{DUMMY_SP, Span};
3
4
use super::Expectation::*;
5
use super::FnCtxt;
@@ -102,7 +102,7 @@ impl<'a, 'tcx> Expectation<'tcx> {
102
/// such a constraint, if it exists.
103
pub(super) fn only_has_type(self, fcx: &FnCtxt<'a, 'tcx>) -> Option<Ty<'tcx>> {
104
match self {
105
- ExpectHasType(ty) => Some(fcx.resolve_vars_if_possible(ty)),
+ ExpectHasType(ty) => Some(fcx.try_structurally_resolve_type(DUMMY_SP, ty)),
106
NoExpectation | ExpectCastableToType(_) | ExpectRvalueLikeUnsized(_) => None,
107
}
108
0 commit comments