diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-11-25 12:16:36 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-11-25 12:16:36 +0100 |
| commit | 4301d0266d20d391e5b389e2b37bbe133e3f4e1c (patch) | |
| tree | 9a3d4ca4983f06c2285ffb07c8e0dfa27a12b1eb /compiler/rustc_hir/src | |
| parent | 481b5fadd7994d0f04e9a6fe9ded3f22d6753825 (diff) | |
| download | rust-4301d0266d20d391e5b389e2b37bbe133e3f4e1c.tar.gz rust-4301d0266d20d391e5b389e2b37bbe133e3f4e1c.zip | |
Remove dead code stemming from the old effects desugaring (II)
Diffstat (limited to 'compiler/rustc_hir/src')
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 16e53a27128..e371f5b9da0 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -261,8 +261,6 @@ pub struct ConstArg<'hir> { #[stable_hasher(ignore)] pub hir_id: HirId, pub kind: ConstArgKind<'hir>, - /// Indicates whether this comes from a `~const` desugaring. - pub is_desugared_from_effects: bool, } impl<'hir> ConstArg<'hir> { @@ -462,14 +460,7 @@ impl<'hir> GenericArgs<'hir> { /// This function returns the number of type and const generic params. /// It should only be used for diagnostics. pub fn num_generic_params(&self) -> usize { - self.args - .iter() - .filter(|arg| match arg { - GenericArg::Lifetime(_) - | GenericArg::Const(ConstArg { is_desugared_from_effects: true, .. }) => false, - _ => true, - }) - .count() + self.args.iter().filter(|arg| !matches!(arg, GenericArg::Lifetime(_))).count() } /// The span encompassing the arguments and constraints[^1] inside the surrounding brackets. |
