Enforce that query results implement Debug

This commit is contained in:
Aaron Hill
2021-01-03 09:19:16 -05:00
parent 492b83c697
commit 7afb32557d
22 changed files with 45 additions and 33 deletions

View File

@@ -183,7 +183,7 @@ pub struct ImplHeader<'tcx> {
pub predicates: Vec<Predicate<'tcx>>,
}
#[derive(Copy, Clone, PartialEq, TyEncodable, TyDecodable, HashStable)]
#[derive(Copy, Clone, PartialEq, TyEncodable, TyDecodable, HashStable, Debug)]
pub enum ImplPolarity {
/// `impl Trait for Type`
Positive,
@@ -433,7 +433,7 @@ pub enum Variance {
/// HIR of every item in the local crate. Instead, use
/// `tcx.variances_of()` to get the variance for a *particular*
/// item.
#[derive(HashStable)]
#[derive(HashStable, Debug)]
pub struct CrateVariancesMap<'tcx> {
/// For each item with generics, maps to a vector of the variance
/// of its generics. If an item has no generics, it will have no
@@ -1208,7 +1208,7 @@ impl<'tcx> Binder<PredicateAtom<'tcx>> {
/// HIR of every item in the local crate. Instead, use
/// `tcx.inferred_outlives_of()` to get the outlives for a *particular*
/// item.
#[derive(HashStable)]
#[derive(HashStable, Debug)]
pub struct CratePredicatesMap<'tcx> {
/// For each struct with outlive bounds, maps to a vector of the
/// predicate of its outlive bounds. If an item has no outlives
@@ -3150,7 +3150,7 @@ impl<'tcx> TyCtxt<'tcx> {
}
}
#[derive(Clone, HashStable)]
#[derive(Clone, HashStable, Debug)]
pub struct AdtSizedConstraint<'tcx>(pub &'tcx [Ty<'tcx>]);
/// Yields the parent function's `DefId` if `def_id` is an `impl Trait` definition.