Skip to content

Commit 5c5722b

Browse files
committed
Encode const params attributes in rmeta
1 parent ea89080 commit 5c5722b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compiler/rustc_metadata/src/rmeta/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ fn should_encode_attrs(def_kind: DefKind) -> bool {
943943
| DefKind::AssocConst { .. }
944944
| DefKind::Macro(_)
945945
| DefKind::Field
946+
| DefKind::ConstParam
946947
| DefKind::Impl { .. } => true,
947948
// Encoding attrs for `Use` items allows `#[doc(hidden)]` on re-exports
948949
// to be read cross-crate, which is needed for diagnostic path selection
@@ -955,7 +956,6 @@ fn should_encode_attrs(def_kind: DefKind) -> bool {
955956
DefKind::Closure => true,
956957
DefKind::SyntheticCoroutineBody => false,
957958
DefKind::TyParam
958-
| DefKind::ConstParam
959959
| DefKind::Ctor(..)
960960
| DefKind::ExternCrate
961961
| DefKind::ForeignMod

0 commit comments

Comments
 (0)