1
Fork 0

Move impl constness into impl trait header

This commit is contained in:
Oli Scherer 2024-12-10 10:12:36 +00:00
parent c0e0d8f874
commit 2ffe3b1e70
8 changed files with 35 additions and 33 deletions

View file

@ -1264,11 +1264,7 @@ fn should_encode_fn_sig(def_kind: DefKind) -> bool {
fn should_encode_constness(def_kind: DefKind) -> bool {
match def_kind {
DefKind::Fn
| DefKind::AssocFn
| DefKind::Closure
| DefKind::Impl { of_trait: true }
| DefKind::Ctor(_, CtorKind::Fn) => true,
DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Ctor(_, CtorKind::Fn) => true,
DefKind::Struct
| DefKind::Union
@ -1280,7 +1276,7 @@ fn should_encode_constness(def_kind: DefKind) -> bool {
| DefKind::Static { .. }
| DefKind::TyAlias
| DefKind::OpaqueTy
| DefKind::Impl { of_trait: false }
| DefKind::Impl { .. }
| DefKind::ForeignTy
| DefKind::ConstParam
| DefKind::InlineConst