Skip to content

Commit 0cbe7f8

Browse files
authored
fix: correct debug output for tracked fields (#826)
1 parent d18dc77 commit 0cbe7f8

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

components/salsa-macro-rules/src/setup_tracked_struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ macro_rules! setup_tracked_struct {
109109
impl $zalsa_struct::Configuration for $Configuration {
110110
const DEBUG_NAME: &'static str = stringify!($Struct);
111111

112-
const FIELD_DEBUG_NAMES: &'static [&'static str] = &[
113-
$(stringify!($field_id),)*
112+
const TRACKED_FIELD_NAMES: &'static [&'static str] = &[
113+
$(stringify!($tracked_id),)*
114114
];
115115

116116
const TRACKED_FIELD_INDICES: &'static [usize] = &[

src/tracked_struct.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ pub trait Configuration: Sized + 'static {
3333
/// The debug name of the tracked struct.
3434
const DEBUG_NAME: &'static str;
3535

36-
/// The debug names of any fields.
37-
const FIELD_DEBUG_NAMES: &'static [&'static str];
36+
/// The debug names of any tracked fields.
37+
const TRACKED_FIELD_NAMES: &'static [&'static str];
3838

3939
/// The relative indices of any tracked fields.
4040
const TRACKED_FIELD_INDICES: &'static [usize];
@@ -115,10 +115,10 @@ impl<C: Configuration> Jar for JarImpl<C> {
115115
C::TRACKED_FIELD_INDICES
116116
.iter()
117117
.copied()
118-
.map(|relative_tracked_index| {
118+
.map(|tracked_index| {
119119
Box::new(<FieldIngredientImpl<C>>::new(
120-
relative_tracked_index,
121-
struct_index.successor(relative_tracked_index),
120+
tracked_index,
121+
struct_index.successor(tracked_index),
122122
)) as _
123123
});
124124

src/tracked_struct/tracked_field.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ where
6666
fmt,
6767
"{}.{}({:?})",
6868
C::DEBUG_NAME,
69-
C::FIELD_DEBUG_NAMES[self.field_index],
69+
C::TRACKED_FIELD_NAMES[self.field_index],
7070
index
7171
)
7272
}
7373

7474
fn debug_name(&self) -> &'static str {
75-
C::FIELD_DEBUG_NAMES[self.field_index]
75+
C::TRACKED_FIELD_NAMES[self.field_index]
7676
}
7777

7878
fn memo_table_types(&self) -> Arc<MemoTableTypes> {

0 commit comments

Comments
 (0)