diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-15 14:38:32 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-05-15 14:38:32 +0200 |
| commit | 175345b8640e774089fd89cddc000f677c4fb316 (patch) | |
| tree | 181354a8fee21bb01ae620680ad097bec531c892 /compiler | |
| parent | da093d713ad43ed918a667e48f62ad285d9924d1 (diff) | |
| download | rust-175345b8640e774089fd89cddc000f677c4fb316.tar.gz rust-175345b8640e774089fd89cddc000f677c4fb316.zip | |
Fix tests on traits.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_incremental/src/persist/dirty_clean.rs | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/compiler/rustc_incremental/src/persist/dirty_clean.rs b/compiler/rustc_incremental/src/persist/dirty_clean.rs index b4963e2e460..1a08d6e58d2 100644 --- a/compiler/rustc_incremental/src/persist/dirty_clean.rs +++ b/compiler/rustc_incremental/src/persist/dirty_clean.rs @@ -101,6 +101,12 @@ const LABELS_FN_IN_TRAIT: &[&[&str]] = const LABELS_HIR_ONLY: &[&[&str]] = &[BASE_HIR]; /// Impl `DepNode`s. +const LABELS_TRAIT: &[&[&str]] = &[ + BASE_HIR, + &[label_strs::associated_item_def_ids, label_strs::predicates_of, label_strs::generics_of], +]; + +/// Impl `DepNode`s. const LABELS_IMPL: &[&[&str]] = &[BASE_HIR, BASE_IMPL]; /// Abstract data type (struct, enum, union) `DepNode`s. @@ -259,20 +265,7 @@ impl DirtyCleanVisitor<'tcx> { HirItem::Union(..) => ("ItemUnion", LABELS_ADT), // Represents a Trait Declaration - // FIXME(michaelwoerister): trait declaration is buggy because sometimes some of - // the depnodes don't exist (because they legitimately didn't need to be - // calculated) - // - // michaelwoerister and vitiral came up with a possible solution, - // to just do this before every query - // ``` - // ::rustc_middle::ty::query::plumbing::force_from_dep_node(tcx, dep_node) - // ``` - // - // However, this did not seem to work effectively and more bugs were hit. - // Nebie @vitiral gave up :) - // - //HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT), + HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT), // An implementation, eg `impl<A> Trait for Foo { .. }` HirItem::Impl { .. } => ("ItemKind::Impl", LABELS_IMPL), |
