Move impl constness into impl trait header
This commit is contained in:
parent
c0e0d8f874
commit
2ffe3b1e70
8 changed files with 35 additions and 33 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue