about summary refs log tree commit diff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-09-09 22:02:18 +0530
committerGitHub <noreply@github.com>2022-09-09 22:02:18 +0530
commitae4973281bee496f107ed9db5c3ff1487981af4e (patch)
tree99cf005ab7563587fe6018f388e70b7006f15e82 /compiler/rustc_middle
parentfcdd5016c518c3ac3e46183933c65dc23c9f5f51 (diff)
parent5db69074988b0edf6751192336398d0673ee81a2 (diff)
downloadrust-ae4973281bee496f107ed9db5c3ff1487981af4e.tar.gz
rust-ae4973281bee496f107ed9db5c3ff1487981af4e.zip
Rollup merge of #101573 - lcnr:param-kind-ord, r=BoxyUwU
update `ParamKindOrd`

https://github.com/rust-lang/rust/pull/90207#discussion_r767160854 :grin:

writing comments "for future prs" sure works well :3

r? `@BoxyUwU`
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/ty/generics.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/generics.rs b/compiler/rustc_middle/src/ty/generics.rs
index 8631ee91fa4..0c8bdde9c8b 100644
--- a/compiler/rustc_middle/src/ty/generics.rs
+++ b/compiler/rustc_middle/src/ty/generics.rs
@@ -27,8 +27,9 @@ impl GenericParamDefKind {
     pub fn to_ord(&self) -> ast::ParamKindOrd {
         match self {
             GenericParamDefKind::Lifetime => ast::ParamKindOrd::Lifetime,
-            GenericParamDefKind::Type { .. } => ast::ParamKindOrd::Type,
-            GenericParamDefKind::Const { .. } => ast::ParamKindOrd::Const,
+            GenericParamDefKind::Type { .. } | GenericParamDefKind::Const { .. } => {
+                ast::ParamKindOrd::TypeOrConst
+            }
         }
     }