aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-05-08 18:30:02 +0100
committerFlorian Diebold <[email protected]>2020-05-08 18:30:02 +0100
commitf8bf94a4b94074eb344e495dfb4dab4bec6bc20e (patch)
tree34eed0506628adbea0d54ad6c4aac91404f140fe /crates
parentb60970fd2050f844e3e52fcfd1724a8c527a11af (diff)
Use matches!
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir_ty/src/lib.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/ra_hir_ty/src/lib.rs
index ac0ef1bfe..3e5f38d0d 100644
--- a/crates/ra_hir_ty/src/lib.rs
+++ b/crates/ra_hir_ty/src/lib.rs
@@ -731,10 +731,7 @@ impl Ty {
731 } 731 }
732 732
733 pub fn is_never(&self) -> bool { 733 pub fn is_never(&self) -> bool {
734 match self { 734 matches!(self, Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. }))
735 Ty::Apply(ApplicationTy { ctor: TypeCtor::Never, .. }) => true,
736 _ => false,
737 }
738 } 735 }
739 736
740 /// If this is a `dyn Trait` type, this returns the `Trait` part. 737 /// If this is a `dyn Trait` type, this returns the `Trait` part.