X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_query_system%2Fsrc%2Fvalues.rs;h=b6e2cfa3dca5e3c33ab02040cea3b2f55b9e75f5;hb=36ef4f15d3eb03d6a99657d13ef06209263c2cf9;hp=214656abed4dfeb3d13c858faeb67eec9db82830;hpb=ebf579932dd3c89c64368e23501310611b0e0ccf;p=rust.git diff --git a/compiler/rustc_query_system/src/values.rs b/compiler/rustc_query_system/src/values.rs index 214656abed4..b6e2cfa3dca 100644 --- a/compiler/rustc_query_system/src/values.rs +++ b/compiler/rustc_query_system/src/values.rs @@ -1,12 +1,12 @@ -use crate::dep_graph::DepContext; +use crate::dep_graph::{DepContext, DepKind}; use crate::query::QueryInfo; -pub trait Value: Sized { - fn from_cycle_error(tcx: Tcx, cycle: &[QueryInfo]) -> Self; +pub trait Value: Sized { + fn from_cycle_error(tcx: Tcx, cycle: &[QueryInfo]) -> Self; } -impl Value for T { - default fn from_cycle_error(tcx: Tcx, _: &[QueryInfo]) -> T { +impl Value for T { + default fn from_cycle_error(tcx: Tcx, _: &[QueryInfo]) -> T { tcx.sess().abort_if_errors(); // Ideally we would use `bug!` here. But bug! is only defined in rustc_middle, and it's // non-trivial to define it earlier.