Add runtime check to avoid overwrite arg easily in diag and store and restore snapshot when set subdiag arg
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This commit is contained in:
@@ -293,6 +293,9 @@ impl Subdiagnostic for FrameNote {
|
||||
span.push_span_label(self.span, fluent::const_eval_frame_note_last);
|
||||
}
|
||||
let msg = diag.eagerly_translate(fluent::const_eval_frame_note);
|
||||
diag.remove_arg("times");
|
||||
diag.remove_arg("where_");
|
||||
diag.remove_arg("instance");
|
||||
diag.span_note(span, msg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user