Skip to content

Commit c889eba

Browse files
committed
Add comment about deprecation
1 parent 6a6767f commit c889eba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/shims/backtrace.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
101101
let num_fields = dest.layout.layout.fields.count();
102102

103103
if !(4..=5).contains(&num_fields) {
104-
// Always mention 5 fields, since the 4-field struct is only supported
105-
// for backwards compatiblity. New code should declare 5 fields.
104+
// Always mention 5 fields, since the 4-field struct
105+
// is deprecated and slated for removal.
106106
throw_ub_format!("bad declaration of miri_resolve_frame - should return a struct with 5 fields");
107107
}
108108

@@ -133,6 +133,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
133133
this.write_scalar(lineno_alloc, this.mplace_field(dest, 2)?.into())?;
134134
this.write_scalar(colno_alloc, this.mplace_field(dest, 3)?.into())?;
135135

136+
// Support a 4-field struct for now - this is deprecated
137+
// and slated for removal.
136138
if num_fields == 5 {
137139
this.write_scalar(fn_ptr, this.mplace_field(dest, 4)?.into())?;
138140
}

0 commit comments

Comments
 (0)