about summary refs log tree commit diff
path: root/compiler/rustc_span/src/def_id.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_span/src/def_id.rs')
-rw-r--r--compiler/rustc_span/src/def_id.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/def_id.rs b/compiler/rustc_span/src/def_id.rs
index 326dce7838d..5d15757f1ab 100644
--- a/compiler/rustc_span/src/def_id.rs
+++ b/compiler/rustc_span/src/def_id.rs
@@ -11,8 +11,8 @@ use std::hash::{Hash, Hasher};
 
 rustc_index::newtype_index! {
     #[custom_encodable]
+    #[debug_format = "crate{}"]
     pub struct CrateNum {
-        DEBUG_FORMAT = "crate{}"
     }
 }
 
@@ -195,8 +195,8 @@ rustc_index::newtype_index! {
     /// particular definition. It should really be considered an interned
     /// shorthand for a particular DefPath.
     #[custom_encodable] // (only encodable in metadata)
+    #[debug_format = "DefIndex({})"]
     pub struct DefIndex {
-        DEBUG_FORMAT = "DefIndex({})",
         /// The crate root is always assigned index 0 by the AST Map code,
         /// thanks to `NodeCollector::new`.
         const CRATE_DEF_INDEX = 0,