derive various Lift impl instead of hand rolling them

This commit is contained in:
Oli Scherer
2022-09-08 09:04:52 +00:00
parent 00fcc82df2
commit d4e986c1f0
10 changed files with 32 additions and 385 deletions

View File

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