@@ -100,6 +100,12 @@ const LABELS_FN_IN_TRAIT: &[&[&str]] =
100
100
/// For generic cases like inline-assembly, modules, etc.
101
101
const LABELS_HIR_ONLY : & [ & [ & str ] ] = & [ BASE_HIR ] ;
102
102
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
+
103
109
/// Impl `DepNode`s.
104
110
const LABELS_IMPL : & [ & [ & str ] ] = & [ BASE_HIR , BASE_IMPL ] ;
105
111
@@ -259,20 +265,7 @@ impl DirtyCleanVisitor<'tcx> {
259
265
HirItem :: Union ( ..) => ( "ItemUnion" , LABELS_ADT ) ,
260
266
261
267
// 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 ) ,
276
269
277
270
// An implementation, eg `impl<A> Trait for Foo { .. }`
278
271
HirItem :: Impl { .. } => ( "ItemKind::Impl" , LABELS_IMPL ) ,
0 commit comments