Make #[debug_format] an attribute in newtype_index
This removes the `custom` format functionality as its only user was trivially migrated to using a normal format. If a new use case for a custom formatting impl pops up, you can add it back.
This commit is contained in:
@@ -115,13 +115,13 @@ impl<'tcx> fmt::Debug for OutlivesConstraint<'tcx> {
|
||||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
#[debug_format = "OutlivesConstraintIndex({})"]
|
||||
pub struct OutlivesConstraintIndex {
|
||||
DEBUG_FORMAT = "OutlivesConstraintIndex({})"
|
||||
}
|
||||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
#[debug_format = "ConstraintSccIndex({})"]
|
||||
pub struct ConstraintSccIndex {
|
||||
DEBUG_FORMAT = "ConstraintSccIndex({})"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ impl_visitable! {
|
||||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
#[debug_format = "bw{}"]
|
||||
pub struct BorrowIndex {
|
||||
DEBUG_FORMAT = "bw{}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ pub struct LocationTable {
|
||||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
#[debug_format = "LocationIndex({})"]
|
||||
pub struct LocationIndex {
|
||||
DEBUG_FORMAT = "LocationIndex({})"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ pub(crate) struct NllMemberConstraint<'tcx> {
|
||||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
#[debug_format = "MemberConstraintIndex({})"]
|
||||
pub(crate) struct NllMemberConstraintIndex {
|
||||
DEBUG_FORMAT = "MemberConstraintIndex({})"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,12 +90,14 @@ impl RegionValueElements {
|
||||
rustc_index::newtype_index! {
|
||||
/// A single integer representing a `Location` in the MIR control-flow
|
||||
/// graph. Constructed efficiently from `RegionValueElements`.
|
||||
pub struct PointIndex { DEBUG_FORMAT = "PointIndex({})" }
|
||||
#[debug_format = "PointIndex({})"]
|
||||
pub struct PointIndex {}
|
||||
}
|
||||
|
||||
rustc_index::newtype_index! {
|
||||
/// A single integer representing a `ty::Placeholder`.
|
||||
pub struct PlaceholderIndex { DEBUG_FORMAT = "PlaceholderIndex({})" }
|
||||
#[debug_format = "PlaceholderIndex({})"]
|
||||
pub struct PlaceholderIndex {}
|
||||
}
|
||||
|
||||
/// An individual element in a region value -- the value of a
|
||||
|
||||
Reference in New Issue
Block a user