about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/traits/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_infer/src/traits/mod.rs')
-rw-r--r--compiler/rustc_infer/src/traits/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/traits/mod.rs b/compiler/rustc_infer/src/traits/mod.rs
index e01b6caf430..9dd4f0a8e4c 100644
--- a/compiler/rustc_infer/src/traits/mod.rs
+++ b/compiler/rustc_infer/src/traits/mod.rs
@@ -89,10 +89,10 @@ impl<'tcx> PredicateObligation<'tcx> {
 impl<'tcx> TraitObligation<'tcx> {
     /// Returns `true` if the trait predicate is considered `const` in its ParamEnv.
     pub fn is_const(&self) -> bool {
-        match (self.predicate.skip_binder().constness, self.param_env.constness()) {
-            (ty::BoundConstness::ConstIfConst, hir::Constness::Const) => true,
-            _ => false,
-        }
+        matches!(
+            (self.predicate.skip_binder().constness, self.param_env.constness()),
+            (ty::BoundConstness::ConstIfConst, hir::Constness::Const)
+        )
     }
 
     pub fn derived_cause(