The needs_drop is a natural info in Rustc and it is needed especially when trying to verify memory safety. How about adding a needs_drop: Either<Vec<TypeDbVar>, bool> field to the definition of TypeDecl? The Vec<TypeDbVar> means "whether this generic type needs drop depends on this list of the generic param types, if any of them has needs_drop == Right(true) then this type also needs drop".