Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry with Reveal::All in validate::mir_assign_valid_types #105454

Closed
wants to merge 1 commit into from
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