use matches! macro in more places
This commit is contained in:
parent
e6e956dade
commit
bcc15bba95
13 changed files with 52 additions and 75 deletions
|
@ -332,10 +332,7 @@ enum FnDeclKind {
|
|||
|
||||
impl FnDeclKind {
|
||||
fn param_impl_trait_allowed(&self) -> bool {
|
||||
match self {
|
||||
FnDeclKind::Fn | FnDeclKind::Inherent | FnDeclKind::Impl | FnDeclKind::Trait => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, FnDeclKind::Fn | FnDeclKind::Inherent | FnDeclKind::Impl | FnDeclKind::Trait)
|
||||
}
|
||||
|
||||
fn return_impl_trait_allowed(&self, tcx: TyCtxt<'_>) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue