about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/instance.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-15 18:14:29 +0000
committerbors <bors@rust-lang.org>2022-09-15 18:14:29 +0000
commitdf34db9b032b15efd86df3544cc75e6d55dc492e (patch)
tree14657ed79c4895970c086d704fcb0674a8f7a904 /compiler/rustc_middle/src/ty/instance.rs
parent35a0407814a6b5a04f0929105631e9c69e293e9d (diff)
parentc6fcb1c6a33d45d34ffed681e73f6e8a5fd35e9b (diff)
downloadrust-df34db9b032b15efd86df3544cc75e6d55dc492e.tar.gz
rust-df34db9b032b15efd86df3544cc75e6d55dc492e.zip
Auto merge of #101858 - oli-obk:lift_derive, r=lcnr
derive various impls instead of hand-rolling them

r? `@lcnr`

This may not have been what you asked for in https://github.com/rust-lang/rust/commit/964b97e845d5dd18e09d5e045f5b376086714836#r84051418 but I got carried away while following the compiler team meeting today.
Diffstat (limited to 'compiler/rustc_middle/src/ty/instance.rs')
-rw-r--r--compiler/rustc_middle/src/ty/instance.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs
index 53218225d53..9afd6620756 100644
--- a/compiler/rustc_middle/src/ty/instance.rs
+++ b/compiler/rustc_middle/src/ty/instance.rs
@@ -20,14 +20,14 @@ use std::fmt;
 /// simply couples a potentially generic `InstanceDef` with some substs, and codegen and const eval
 /// will do all required substitution as they run.
 #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, TyEncodable, TyDecodable)]
-#[derive(HashStable, Lift)]
+#[derive(HashStable, Lift, TypeFoldable, TypeVisitable)]
 pub struct Instance<'tcx> {
     pub def: InstanceDef<'tcx>,
     pub substs: SubstsRef<'tcx>,
 }
 
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-#[derive(TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
+#[derive(TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable, Lift)]
 pub enum InstanceDef<'tcx> {
     /// A user-defined callable item.
     ///