1
Fork 0

Gate the type length limit check behind a nightly flag

This commit is contained in:
Michael Goulet 2024-07-12 21:15:25 -04:00
parent 62c068feea
commit 938ed369ad
17 changed files with 54 additions and 58 deletions

View file

@ -541,7 +541,9 @@ impl<'tcx> Instance<'tcx> {
// which means that rustc basically hangs.
//
// Bail out in these cases to avoid that bad user experience.
if !tcx.type_length_limit().value_within_limit(type_length(args)) {
if tcx.sess.opts.unstable_opts.enforce_type_length_limit
&& !tcx.type_length_limit().value_within_limit(type_length(args))
{
return Ok(None);
}