diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-06-05 16:02:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-05 16:02:03 +0200 |
| commit | 0820dd0bc2817fd028a9be049aec7a42916dbc2c (patch) | |
| tree | cc3317c3bbbe3faf864cdb9469791e08cfb5dfca /compiler/rustc_const_eval/src | |
| parent | 7689558134bc797c070e67df3b86cb405ebd4756 (diff) | |
| parent | 64172481da44e0dd6a705afcea22b58b45b42c5a (diff) | |
Rollup merge of #142015 - oli-obk:wrong-instance, r=RalfJung
Report the actual item that evaluation failed for instead of id of the last frame in the evaluation stack r? ``@RalfJung`` fixes rust-lang/rust#142010
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/eval_queries.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs index 01625b91353..2556e57a58f 100644 --- a/compiler/rustc_const_eval/src/const_eval/eval_queries.rs +++ b/compiler/rustc_const_eval/src/const_eval/eval_queries.rs @@ -454,11 +454,12 @@ fn report_eval_error<'tcx>( // FIXME(oli-obk): figure out how to use structured diagnostics again. diag.code(E0080); diag.span_label(span, crate::fluent_generated::const_eval_error); - diag.arg("instance", instance); - diag.arg("error_kind", kind); for frame in frames { diag.subdiagnostic(frame); } + // Add after the frame rendering above, as it adds its own `instance` args. + diag.arg("instance", instance); + diag.arg("error_kind", kind); }, ) } |
