Skip to content

Commit

Permalink
Don't allow feeding a query cache entry twice
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Dec 1, 2022
1 parent 744a97b commit a0bdb4b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions compiler/rustc_middle/src/ty/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,10 @@ macro_rules! define_feedable {

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

0 comments on commit a0bdb4b

Please sign in to comment.