Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion compiler/rustc_const_eval/src/transform/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,20 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
return true;
}

crate::util::is_subtype(self.tcx, self.param_env, src, dest)
if crate::util::is_subtype(self.tcx, self.param_env, src, dest) {
return true;
}

// FIXME(@lcnr): This is needed to fix #105009 but it isn't yet clear to me why this is
// needed. The check for opaque types above should deal with all cases where we're in the
// defining scope of an opaque type and outside of the defining scope we shouldn't be able
// to rely on the hidden type.
crate::util::is_subtype(
self.tcx,
self.param_env.with_reveal_all_normalized(self.tcx),
src,
dest,
)
}
}

Expand Down