use matches! macro in more places
This commit is contained in:
parent
e6e956dade
commit
bcc15bba95
13 changed files with 52 additions and 75 deletions
|
@ -234,10 +234,7 @@ impl DefKind {
|
|||
|
||||
#[inline]
|
||||
pub fn is_fn_like(self) -> bool {
|
||||
match self {
|
||||
DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Generator => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, DefKind::Fn | DefKind::AssocFn | DefKind::Closure | DefKind::Generator)
|
||||
}
|
||||
|
||||
/// Whether `query get_codegen_attrs` should be used with this definition.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue