merge DefKind::Coroutine
into DefKind::Closure
This commit is contained in:
parent
274b5249eb
commit
f23befe6c1
27 changed files with 83 additions and 94 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue