File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -916,22 +916,6 @@ fn contains_only_wilds(pat: &Pat<'_>) -> bool {
916916
917917/// Returns true if the given patterns forms only exhaustive matches that don't contain enum
918918/// patterns without a wildcard.
919- ///
920- /// For example:
921- ///
922- /// ```
923- /// // Returns false, because the first arm contain enum without a wildcard.
924- /// match x {
925- /// (Some(E::V), _) => todo!(),
926- /// (None, _) => {}
927- /// }
928- ///
929- /// // Returns true, because the both arms form exhaustive matches and without enum variants.
930- /// match x {
931- /// (Some(_), _) => todo!(),
932- /// (None, _) => {}
933- /// }
934- /// ```
935919fn form_exhaustive_matches ( left : & Pat < ' _ > , right : & Pat < ' _ > ) -> bool {
936920 match ( & left. kind , & right. kind ) {
937921 ( PatKind :: Wild , _) | ( _, PatKind :: Wild ) => true ,
You can’t perform that action at this time.
0 commit comments