Skip to content

Commit

Permalink
Structurally resolve in only_has_type
Browse files Browse the repository at this point in the history
FIXME: the span is scuffed
  • Loading branch information
compiler-errors committed Nov 27, 2024
1 parent da0380b commit 6210ed3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_hir_typeck/src/expectation.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use rustc_middle::ty::{self, Ty};
use rustc_span::Span;
use rustc_span::{DUMMY_SP, Span};

use super::Expectation::*;
use super::FnCtxt;
Expand Down Expand Up @@ -102,7 +102,7 @@ impl<'a, 'tcx> Expectation<'tcx> {
/// such a constraint, if it exists.
pub(super) fn only_has_type(self, fcx: &FnCtxt<'a, 'tcx>) -> Option<Ty<'tcx>> {
match self {
ExpectHasType(ty) => Some(fcx.resolve_vars_if_possible(ty)),
ExpectHasType(ty) => Some(fcx.try_structurally_resolve_type(DUMMY_SP, ty)),
NoExpectation | ExpectCastableToType(_) | ExpectRvalueLikeUnsized(_) => None,
}
}
Expand Down

0 comments on commit 6210ed3

Please sign in to comment.