Don't allow feeding a query cache entry twice
This commit is contained in:
parent
744a97b98c
commit
a0bdb4b498
@ -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(()) => (),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user