@@ -457,7 +457,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
457
457
} ;
458
458
459
459
let kind = match trait_item. kind {
460
- ty:: AssociatedKind :: Const => EntryKind :: AssociatedConst ( container) ,
460
+ ty:: AssociatedKind :: Const => {
461
+ EntryKind :: AssociatedConst ( container, 0 )
462
+ }
461
463
ty:: AssociatedKind :: Method => {
462
464
let fn_data = if let hir:: TraitItemKind :: Method ( _, ref m) = ast_item. node {
463
465
let arg_names = match * m {
@@ -533,7 +535,10 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
533
535
} ;
534
536
535
537
let kind = match impl_item. kind {
536
- ty:: AssociatedKind :: Const => EntryKind :: AssociatedConst ( container) ,
538
+ ty:: AssociatedKind :: Const => {
539
+ EntryKind :: AssociatedConst ( container,
540
+ ty:: queries:: mir_const_qualif:: get ( self . tcx , ast_item. span , def_id) )
541
+ }
537
542
ty:: AssociatedKind :: Method => {
538
543
let fn_data = if let hir:: ImplItemKind :: Method ( ref sig, body) = ast_item. node {
539
544
FnData {
@@ -637,7 +642,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
637
642
let kind = match item. node {
638
643
hir:: ItemStatic ( _, hir:: MutMutable , _) => EntryKind :: MutStatic ,
639
644
hir:: ItemStatic ( _, hir:: MutImmutable , _) => EntryKind :: ImmStatic ,
640
- hir:: ItemConst ( ..) => EntryKind :: Const ,
645
+ hir:: ItemConst ( ..) => {
646
+ EntryKind :: Const ( ty:: queries:: mir_const_qualif:: get ( tcx, item. span , def_id) )
647
+ }
641
648
hir:: ItemFn ( _, _, constness, .., body) => {
642
649
let data = FnData {
643
650
constness : constness,
0 commit comments