mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Remove DepKindVTable::is_anon.
It's unused.
This commit is contained in:
@@ -174,11 +174,6 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
/// of the `DepKind`. Overall, this allows to implement `DepContext` using this manual
|
||||
/// jump table instead of large matches.
|
||||
pub struct DepKindVTable<'tcx> {
|
||||
/// Anonymous queries cannot be replayed from one compiler invocation to the next.
|
||||
/// When their result is needed, it is recomputed. They are useful for fine-grained
|
||||
/// dependency tracking, and caching within one compiler invocation.
|
||||
pub is_anon: bool,
|
||||
|
||||
/// Eval-always queries do not track their dependencies, and are always recomputed, even if
|
||||
/// their inputs have not changed since the last compiler invocation. The result is still
|
||||
/// cached within one compiler invocation.
|
||||
|
||||
@@ -13,7 +13,6 @@ mod non_query {
|
||||
// We use this for most things when incr. comp. is turned off.
|
||||
pub(crate) fn Null<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: false,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Unit,
|
||||
force_from_dep_node_fn: Some(|_, dep_node, _| {
|
||||
@@ -26,7 +25,6 @@ pub(crate) fn Null<'tcx>() -> DepKindVTable<'tcx> {
|
||||
// We use this for the forever-red node.
|
||||
pub(crate) fn Red<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: false,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Unit,
|
||||
force_from_dep_node_fn: Some(|_, dep_node, _| {
|
||||
@@ -38,7 +36,6 @@ pub(crate) fn Red<'tcx>() -> DepKindVTable<'tcx> {
|
||||
|
||||
pub(crate) fn SideEffect<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: false,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Unit,
|
||||
force_from_dep_node_fn: Some(|tcx, _, prev_index| {
|
||||
@@ -51,7 +48,6 @@ pub(crate) fn SideEffect<'tcx>() -> DepKindVTable<'tcx> {
|
||||
|
||||
pub(crate) fn AnonZeroDeps<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: true,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Opaque,
|
||||
force_from_dep_node_fn: Some(|_, _, _| bug!("cannot force an anon node")),
|
||||
@@ -61,7 +57,6 @@ pub(crate) fn AnonZeroDeps<'tcx>() -> DepKindVTable<'tcx> {
|
||||
|
||||
pub(crate) fn TraitSelect<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: true,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Unit,
|
||||
force_from_dep_node_fn: None,
|
||||
@@ -71,7 +66,6 @@ pub(crate) fn TraitSelect<'tcx>() -> DepKindVTable<'tcx> {
|
||||
|
||||
pub(crate) fn CompileCodegenUnit<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: false,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Opaque,
|
||||
force_from_dep_node_fn: None,
|
||||
@@ -81,7 +75,6 @@ pub(crate) fn CompileCodegenUnit<'tcx>() -> DepKindVTable<'tcx> {
|
||||
|
||||
pub(crate) fn CompileMonoItem<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: false,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Opaque,
|
||||
force_from_dep_node_fn: None,
|
||||
@@ -91,7 +84,6 @@ pub(crate) fn CompileMonoItem<'tcx>() -> DepKindVTable<'tcx> {
|
||||
|
||||
pub(crate) fn Metadata<'tcx>() -> DepKindVTable<'tcx> {
|
||||
DepKindVTable {
|
||||
is_anon: false,
|
||||
is_eval_always: false,
|
||||
key_fingerprint_style: KeyFingerprintStyle::Unit,
|
||||
force_from_dep_node_fn: None,
|
||||
@@ -124,7 +116,6 @@ pub(crate) fn make_dep_kind_vtable_for_query<'tcx, Q>(
|
||||
}
|
||||
|
||||
DepKindVTable {
|
||||
is_anon,
|
||||
is_eval_always,
|
||||
key_fingerprint_style,
|
||||
force_from_dep_node_fn: can_recover.then_some(force_from_dep_node_inner::<Q>),
|
||||
|
||||
Reference in New Issue
Block a user