about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-02-05 15:22:10 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-03-06 10:03:11 +0000
commit0e7b2835735fc7fee08505fa6c14670bc7ee7601 (patch)
tree66e56105fd9b954d4217c828bf865929b6b8f0c2 /compiler/rustc_trait_selection/src
parent4f2b108816e782f68d5964bec74448c04bd36ac5 (diff)
downloadrust-0e7b2835735fc7fee08505fa6c14670bc7ee7601.tar.gz
rust-0e7b2835735fc7fee08505fa6c14670bc7ee7601.zip
Avoid having to handle an `Option` in the type system
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/wf.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs
index 18906a6a8ce..0fece96a3eb 100644
--- a/compiler/rustc_trait_selection/src/traits/wf.rs
+++ b/compiler/rustc_trait_selection/src/traits/wf.rs
@@ -738,12 +738,8 @@ impl<'a, 'tcx> TypeVisitor<TyCtxt<'tcx>> for WfPredicates<'a, 'tcx> {
                                 }
                             }
                         };
-                        if let Some(start) = start {
-                            check(start)
-                        }
-                        if let Some(end) = end {
-                            check(end)
-                        }
+                        check(start);
+                        check(end);
                     }
                 }
             }