Ensure no one constructs AliasTys themselves
This commit is contained in:
@@ -205,7 +205,7 @@ impl<'cx, 'tcx> FallibleTypeFolder<'tcx> for QueryNormalizer<'cx, 'tcx> {
|
||||
// This is really important. While we *can* handle this, this has
|
||||
// severe performance implications for large opaque types with
|
||||
// late-bound regions. See `issue-88862` benchmark.
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs })
|
||||
ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs, .. })
|
||||
if !substs.has_escaping_bound_vars() =>
|
||||
{
|
||||
// Only normalize `impl Trait` outside of type inference, usually in codegen.
|
||||
|
||||
Reference in New Issue
Block a user