about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorxizheyin <xizheyin@smail.nju.edu.cn>2025-06-22 00:12:13 +0800
committerxizheyin <xizheyin@smail.nju.edu.cn>2025-06-25 21:07:16 +0800
commitd2d17c60bd62c03b91f6ded31b34da90addf2fc0 (patch)
tree712bb199f9527c72eee0185f4ff98101132bebee /compiler/rustc_const_eval/src
parent2fcf1776b9ccef89993dfe40e9f5c4908e2d2d48 (diff)
downloadrust-d2d17c60bd62c03b91f6ded31b34da90addf2fc0.tar.gz
rust-d2d17c60bd62c03b91f6ded31b34da90addf2fc0.zip
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>
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/errors.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index 037cbf777e7..4ea2d6f2ebb 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -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);
     }
 }