From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_query_system/src/values.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_query_system/src/values.rs') diff --git a/compiler/rustc_query_system/src/values.rs b/compiler/rustc_query_system/src/values.rs index b6e2cfa3d..ce551078c 100644 --- a/compiler/rustc_query_system/src/values.rs +++ b/compiler/rustc_query_system/src/values.rs @@ -6,10 +6,13 @@ pub trait Value: Sized { } impl Value for T { - default fn from_cycle_error(tcx: Tcx, _: &[QueryInfo]) -> T { + default fn from_cycle_error(tcx: Tcx, cycle: &[QueryInfo]) -> T { tcx.sess().abort_if_errors(); // Ideally we would use `bug!` here. But bug! is only defined in rustc_middle, and it's // non-trivial to define it earlier. - panic!("Value::from_cycle_error called without errors"); + panic!( + "<{} as Value>::from_cycle_error called without errors: {cycle:#?}", + std::any::type_name::() + ); } } -- cgit v1.2.3