diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2025-09-17 04:16:47 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-09-17 04:46:46 +0200 |
| commit | 26f3337d4eda0ba22b615744fda0185d0ee344b1 (patch) | |
| tree | 4cdbe6729660d32e22ca6d08b394199aae8fbedd /compiler/rustc_public/src/ty.rs | |
| parent | a015919e54c60b1b2bec7a98dec478cfc4a48f4e (diff) | |
| download | rust-26f3337d4eda0ba22b615744fda0185d0ee344b1.tar.gz rust-26f3337d4eda0ba22b615744fda0185d0ee344b1.zip | |
Remove `DynKind`
Diffstat (limited to 'compiler/rustc_public/src/ty.rs')
| -rw-r--r-- | compiler/rustc_public/src/ty.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/rustc_public/src/ty.rs b/compiler/rustc_public/src/ty.rs index bcc77ff849d..0afb94c18d7 100644 --- a/compiler/rustc_public/src/ty.rs +++ b/compiler/rustc_public/src/ty.rs @@ -333,7 +333,7 @@ impl TyKind { #[inline] pub fn is_trait(&self) -> bool { - matches!(self, TyKind::RigidTy(RigidTy::Dynamic(_, _, DynKind::Dyn))) + matches!(self, TyKind::RigidTy(RigidTy::Dynamic(_, _))) } #[inline] @@ -472,7 +472,7 @@ impl TyKind { } pub fn trait_principal(&self) -> Option<Binder<ExistentialTraitRef>> { - if let TyKind::RigidTy(RigidTy::Dynamic(predicates, _, _)) = self { + if let TyKind::RigidTy(RigidTy::Dynamic(predicates, _)) = self { if let Some(Binder { value: ExistentialPredicate::Trait(trait_ref), bound_vars }) = predicates.first() { @@ -562,7 +562,7 @@ pub enum RigidTy { Closure(ClosureDef, GenericArgs), Coroutine(CoroutineDef, GenericArgs), CoroutineClosure(CoroutineClosureDef, GenericArgs), - Dynamic(Vec<Binder<ExistentialPredicate>>, Region, DynKind), + Dynamic(Vec<Binder<ExistentialPredicate>>, Region), Never, Tuple(Vec<Ty>), CoroutineWitness(CoroutineWitnessDef, GenericArgs), @@ -1207,11 +1207,6 @@ pub enum BoundRegionKind { } #[derive(Clone, Debug, Eq, PartialEq, Serialize)] -pub enum DynKind { - Dyn, -} - -#[derive(Clone, Debug, Eq, PartialEq, Serialize)] pub enum ExistentialPredicate { Trait(ExistentialTraitRef), Projection(ExistentialProjection), |
