diff --git a/compiler/rustc_middle/src/ty/query.rs b/compiler/rustc_middle/src/ty/query.rs index 47c1379b308..a7fd1754960 100644 --- a/compiler/rustc_middle/src/ty/query.rs +++ b/compiler/rustc_middle/src/ty/query.rs @@ -344,12 +344,10 @@ pub fn $name(self, value: $V) -> query_stored::$name<'tcx> { match cached { Ok(old) => { - assert_eq!( - value, old, - "Trying to feed an already recorded value for query {} key={key:?}", + bug!( + "Trying to feed an already recorded value for query {} key={key:?}:\nold value: {old:?}\nnew value: {value:?}", stringify!($name), ); - return old; } Err(()) => (), }