Skip to content

Commit 4a3732b

Browse files
committed
Reduce work to report errors.
1 parent 6331c92 commit 4a3732b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/rustc_const_eval/src/const_eval/eval_queries.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,6 @@ fn report_eval_error<'tcx>(
414414
let (error, backtrace) = error.into_parts();
415415
backtrace.print_backtrace();
416416

417-
let instance = with_no_trimmed_paths!(cid.instance.to_string());
418-
419417
super::report(
420418
ecx,
421419
error,
@@ -430,7 +428,7 @@ fn report_eval_error<'tcx>(
430428
diag.subdiagnostic(frame);
431429
}
432430
// Add after the frame rendering above, as it adds its own `instance` args.
433-
diag.arg("instance", instance);
431+
diag.arg("instance", with_no_trimmed_paths!(cid.instance.to_string()));
434432
diag.arg("num_frames", num_frames);
435433
},
436434
)

0 commit comments

Comments
 (0)