Don't allow feeding a query cache entry twice

This commit is contained in:
Oli Scherer 2022-12-01 09:48:33 +00:00
parent 744a97b98c
commit a0bdb4b498

View File

@ -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(()) => (),
}