Fill in def_span when creating def ids.
This makes sure that ICEing because of def ids created outside of ast lowering will be able to produce a query backtrace and not cause a double panic because of trying to call the `def_span` query
This commit is contained in:
@@ -532,7 +532,8 @@ impl<K: DepKind> DepGraph<K> {
|
||||
let mut edges = SmallVec::new();
|
||||
K::read_deps(|task_deps| match task_deps {
|
||||
TaskDepsRef::Allow(deps) => edges.extend(deps.lock().reads.iter().copied()),
|
||||
TaskDepsRef::Ignore | TaskDepsRef::Forbid => {
|
||||
TaskDepsRef::Ignore => {} // During HIR lowering, we have no dependencies.
|
||||
TaskDepsRef::Forbid => {
|
||||
panic!("Cannot summarize when dependencies are not recorded.")
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user