Skip to content

Commit 988569f

Browse files
committed
remove unnecessary TypeFoldable impls
1 parent 2886b36 commit 988569f

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,8 @@ pub struct ParamEnvAnd<'tcx, T> {
10311031
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, HashStable)]
10321032
#[derive(TypeVisitable, TypeFoldable)]
10331033
pub struct TypingEnv<'tcx> {
1034+
#[type_foldable(identity)]
1035+
#[type_visitable(ignore)]
10341036
pub typing_mode: TypingMode<'tcx>,
10351037
pub param_env: ParamEnv<'tcx>,
10361038
}

compiler/rustc_type_ir/src/canonical.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ impl<I: Interner> CanonicalVarKind<I> {
199199
/// usize or f32). In order to faithfully reproduce a type, we need to
200200
/// know what set of types a given type variable can be unified with.
201201
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
202-
#[derive(TypeVisitable_Generic, TypeFoldable_Generic)]
203202
#[cfg_attr(
204203
feature = "nightly",
205204
derive(Decodable_NoContext, Encodable_NoContext, HashStable_NoContext)

compiler/rustc_type_ir/src/const_kind.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,10 @@ rustc_index::newtype_index! {
9292

9393
/// An inference variable for a const, for use in const generics.
9494
#[derive(Copy, Clone, Eq, PartialEq, PartialOrd, Ord, Hash)]
95-
#[derive(TypeVisitable_Generic, TypeFoldable_Generic)]
9695
#[cfg_attr(feature = "nightly", derive(Encodable_NoContext, Decodable_NoContext))]
9796
pub enum InferConst {
9897
/// Infer the value of the const.
99-
Var(
100-
#[type_foldable(identity)]
101-
#[type_visitable(ignore)]
102-
ConstVid,
103-
),
98+
Var(ConstVid),
10499
/// A fresh const variable. See `infer::freshen` for more details.
105100
Fresh(u32),
106101
}

compiler/rustc_type_ir/src/infer_ctxt.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use derive_where::derive_where;
22
#[cfg(feature = "nightly")]
33
use rustc_macros::{Decodable_NoContext, Encodable_NoContext, HashStable_NoContext};
4-
use rustc_type_ir_macros::{TypeFoldable_Generic, TypeVisitable_Generic};
54

65
use crate::fold::TypeFoldable;
76
use crate::inherent::*;
@@ -20,7 +19,6 @@ use crate::{self as ty, Interner};
2019
/// If neither of these functions are available, feel free to reach out to
2120
/// t-types for help.
2221
#[derive_where(Clone, Copy, Hash, PartialEq, Eq, Debug; I: Interner)]
23-
#[derive(TypeVisitable_Generic, TypeFoldable_Generic)]
2422
#[cfg_attr(
2523
feature = "nightly",
2624
derive(Encodable_NoContext, Decodable_NoContext, HashStable_NoContext)

0 commit comments

Comments
 (0)