From bef8681a1837790f2745c1f6a7f8214af2fd7f5d Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 12 Oct 2022 04:17:21 +0000 Subject: [PATCH] TyAlias needs encoded constness too, for layout computation in rustdoc --- compiler/rustc_metadata/src/rmeta/encoder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs index ab4ecec2af36e..68119598285c5 100644 --- a/compiler/rustc_metadata/src/rmeta/encoder.rs +++ b/compiler/rustc_metadata/src/rmeta/encoder.rs @@ -1078,9 +1078,9 @@ fn should_encode_constness(def_kind: DefKind) -> bool { | DefKind::ImplTraitPlaceholder | DefKind::Impl | DefKind::Closure - | DefKind::Generator => true, + | DefKind::Generator + | DefKind::TyAlias => true, DefKind::Variant - | DefKind::TyAlias | DefKind::TraitAlias | DefKind::ForeignTy | DefKind::Field