@@ -100,6 +100,12 @@ const LABELS_FN_IN_TRAIT: &[&[&str]] =
100100/// For generic cases like inline-assembly, modules, etc.
101101const LABELS_HIR_ONLY : & [ & [ & str ] ] = & [ BASE_HIR ] ;
102102
103+ /// Impl `DepNode`s.
104+ const LABELS_TRAIT : & [ & [ & str ] ] = & [
105+ BASE_HIR ,
106+ & [ label_strs:: associated_item_def_ids, label_strs:: predicates_of, label_strs:: generics_of] ,
107+ ] ;
108+
103109/// Impl `DepNode`s.
104110const LABELS_IMPL : & [ & [ & str ] ] = & [ BASE_HIR , BASE_IMPL ] ;
105111
@@ -259,20 +265,7 @@ impl DirtyCleanVisitor<'tcx> {
259265 HirItem :: Union ( ..) => ( "ItemUnion" , LABELS_ADT ) ,
260266
261267 // Represents a Trait Declaration
262- // FIXME(michaelwoerister): trait declaration is buggy because sometimes some of
263- // the depnodes don't exist (because they legitimately didn't need to be
264- // calculated)
265- //
266- // michaelwoerister and vitiral came up with a possible solution,
267- // to just do this before every query
268- // ```
269- // ::rustc_middle::ty::query::plumbing::force_from_dep_node(tcx, dep_node)
270- // ```
271- //
272- // However, this did not seem to work effectively and more bugs were hit.
273- // Nebie @vitiral gave up :)
274- //
275- //HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT),
268+ HirItem :: Trait ( ..) => ( "ItemTrait" , LABELS_TRAIT ) ,
276269
277270 // An implementation, eg `impl<A> Trait for Foo { .. }`
278271 HirItem :: Impl { .. } => ( "ItemKind::Impl" , LABELS_IMPL ) ,
0 commit comments