Also expand weak alias tys inside consts inside `expand_weak_alias_tys` · rust-lang/rust@35a5be2

File tree

1 file changed

lines changed

  • compiler/rustc_middle/src/ty

1 file changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -1130,7 +1130,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for WeakAliasTypeExpander<'tcx> {

11301130

}

11311131
11321132

fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> {

1133-

if !ct.ty().has_type_flags(ty::TypeFlags::HAS_TY_WEAK) {

1133+

if !ct.has_type_flags(ty::TypeFlags::HAS_TY_WEAK) {

11341134

return ct;

11351135

}

11361136

ct.super_fold_with(self)