diff --git a/compiler/rustc_middle/src/dep_graph/graph.rs b/compiler/rustc_middle/src/dep_graph/graph.rs index 490c07f65383..b5c32a1848ae 100644 --- a/compiler/rustc_middle/src/dep_graph/graph.rs +++ b/compiler/rustc_middle/src/dep_graph/graph.rs @@ -214,11 +214,11 @@ pub fn assert_ignored(&self) { } pub fn assert_eval_always(&self) { - self.data.as_ref().inspect(|_| { + if self.data.is_some() { read_deps(|deps| { assert_matches!(deps, TaskDepsRef::EvalAlways, "expected eval always context") }); - }); + } } pub fn with_ignore(&self, op: OP) -> R