Add #[derive(TypeVisitable)]

This commit is contained in:
Alan Egerton
2022-06-17 10:53:29 +01:00
parent bca894909c
commit e4b9625b87
31 changed files with 183 additions and 221 deletions

View File

@@ -13,7 +13,7 @@ use rustc_target::spec::abi;
use std::borrow::Cow;
use std::fmt;
#[derive(Clone, Copy, Debug, PartialEq, Eq, TypeFoldable)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, TypeFoldable, TypeVisitable)]
pub struct ExpectedFound<T> {
pub expected: T,
pub found: T,
@@ -30,7 +30,7 @@ impl<T> ExpectedFound<T> {
}
// Data structures used in type unification
#[derive(Clone, Debug, TypeFoldable)]
#[derive(Clone, Debug, TypeFoldable, TypeVisitable)]
pub enum TypeError<'tcx> {
Mismatch,
ConstnessMismatch(ExpectedFound<ty::BoundConstness>),