about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/def.rs
diff options
context:
space:
mode:
authorbohan <bohan-zhang@foxmail.com>2023-11-26 21:05:08 +0800
committerbohan <bohan-zhang@foxmail.com>2023-11-26 21:05:08 +0800
commitf23befe6c118573a2ca041bc89f959a8813b43a2 (patch)
treedc0185a1375a527e7112b07412295916683cff7e /compiler/rustc_hir/src/def.rs
parent274b5249eb1014b441fd9fe45e9373111f61e413 (diff)
downloadrust-f23befe6c118573a2ca041bc89f959a8813b43a2.tar.gz
rust-f23befe6c118573a2ca041bc89f959a8813b43a2.zip
merge `DefKind::Coroutine` into `DefKind::Closure`
Diffstat (limited to 'compiler/rustc_hir/src/def.rs')
-rw-r--r--compiler/rustc_hir/src/def.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_hir/src/def.rs b/compiler/rustc_hir/src/def.rs
index e901eba35b7..fedd380cada 100644
--- a/compiler/rustc_hir/src/def.rs
+++ b/compiler/rustc_hir/src/def.rs
@@ -114,7 +114,6 @@ pub enum DefKind {
         of_trait: bool,
     },
     Closure,
-    Coroutine,
 }
 
 impl DefKind {
@@ -157,7 +156,6 @@ impl DefKind {
             DefKind::Field => "field",
             DefKind::Impl { .. } => "implementation",
             DefKind::Closure => "closure",
-            DefKind::Coroutine => "coroutine",
             DefKind::ExternCrate => "extern crate",
             DefKind::GlobalAsm => "global assembly block",
         }
@@ -216,7 +214,6 @@ impl DefKind {
             | DefKind::LifetimeParam
             | DefKind::ExternCrate
             | DefKind::Closure
-            | DefKind::Coroutine
             | DefKind::Use
             | DefKind::ForeignMod
             | DefKind::GlobalAsm
@@ -226,7 +223,7 @@ impl DefKind {
 
     #[inline]
     pub fn is_fn_like(self) -> bool {
-        matches!(self, DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Coroutine)
+        matches!(self, DefKind::Fn | DefKind::AssocFn | DefKind::Closure)
     }
 
     /// Whether `query get_codegen_attrs` should be used with this definition.
@@ -236,7 +233,6 @@ impl DefKind {
             | DefKind::AssocFn
             | DefKind::Ctor(..)
             | DefKind::Closure
-            | DefKind::Coroutine
             | DefKind::Static(_) => true,
             DefKind::Mod
             | DefKind::Struct