1
Fork 0

Remove deref_mir_constant

This commit is contained in:
Oli Scherer 2023-05-24 15:38:43 +00:00
parent d030ece6f7
commit aa3a1862ba
4 changed files with 1 additions and 53 deletions

View file

@ -464,9 +464,6 @@ impl<'tcx> ConstToPat<'tcx> {
// deref pattern.
_ => {
if !pointee_ty.is_sized(tcx, param_env) {
// `tcx.deref_mir_constant()` below will ICE with an unsized type
// (except slices, which are handled in a separate arm above).
let err = UnsizedPattern { span, non_sm_ty: *pointee_ty };
tcx.sess.emit_err(err);