Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/79569.sh: fixed with errors #567

Merged
merged 1 commit into from
Dec 18, 2020
Merged

ices/79569.sh: fixed with errors #567

merged 1 commit into from
Dec 18, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#79569

#!/bin/bash

rustc -Zinstrument-coverage - << EOF
#![feature(or_patterns)]
#![deny(unreachable_patterns)]

// We wrap patterns in a tuple because top-level or-patterns were special-cased.
fn main() {
    match (0u8, 0u8) {
        //~^ ERROR non-exhaustive patterns: `(2_u8..=u8::MAX, _)`
        (0 | 1, 2 | 3) => {}
    }
    match ((0u8,),) {
        //~^ ERROR non-exhaustive patterns: `((4_u8..=u8::MAX))`
        ((0 | 1,) | (2 | 3,),) => {}
    }
    match (Some(0u8),) {
        //~^ ERROR non-exhaustive patterns: `(Some(2_u8..=u8::MAX))`
        (None | Some(0 | 1),) => {}
    }
}
EOF
=== stdout ===
=== stderr ===
/home/runner/work/glacier/glacier/ices/79569.sh: line 3: 2_u8..=u8::MAX,: command not found
/home/runner/work/glacier/glacier/ices/79569.sh: line 3: ((: 4_u8: value too great for base (error token is "4_u8")
/home/runner/work/glacier/glacier/ices/79569.sh: command substitution: line 3: syntax error near unexpected token `2_u8..=u8::MAX'
/home/runner/work/glacier/glacier/ices/79569.sh: command substitution: line 3: `(Some(2_u8..=u8::MAX))'
error[E0004]: non-exhaustive patterns: `(2_u8..=u8::MAX, _)` not covered
 --> <anon>:6:11
  |
6 |     match (0u8, 0u8) {
  |           ^^^^^^^^^^ pattern `(2_u8..=u8::MAX, _)` not covered
  |
  = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
  = note: the matched value is of type `(u8, u8)`

error[E0004]: non-exhaustive patterns: `((4_u8..=u8::MAX))` not covered
  --> <anon>:10:11
   |
10 |     match ((0u8,),) {
   |           ^^^^^^^^^ pattern `((4_u8..=u8::MAX))` not covered
   |
   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
   = note: the matched value is of type `((u8,),)`

error[E0004]: non-exhaustive patterns: `(Some(2_u8..=u8::MAX))` not covered
  --> <anon>:14:11
   |
14 |     match (Some(0u8),) {
   |           ^^^^^^^^^^^^ pattern `(Some(2_u8..=u8::MAX))` not covered
   |
   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
   = note: the matched value is of type `(Option<u8>,)`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0004`.
==============

=== stdout ===
=== stderr ===
/home/runner/work/glacier/glacier/ices/79569.sh: line 3: 2_u8..=u8::MAX,: command not found
/home/runner/work/glacier/glacier/ices/79569.sh: line 3: ((: 4_u8: value too great for base (error token is "4_u8")
/home/runner/work/glacier/glacier/ices/79569.sh: command substitution: line 3: syntax error near unexpected token `2_u8..=u8::MAX'
/home/runner/work/glacier/glacier/ices/79569.sh: command substitution: line 3: `(Some(2_u8..=u8::MAX))'
error[E0004]: non-exhaustive patterns: `(2_u8..=u8::MAX, _)` not covered
 --> <anon>:6:11
  |
6 |     match (0u8, 0u8) {
  |           ^^^^^^^^^^ pattern `(2_u8..=u8::MAX, _)` not covered
  |
  = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
  = note: the matched value is of type `(u8, u8)`

error[E0004]: non-exhaustive patterns: `((4_u8..=u8::MAX))` not covered
  --> <anon>:10:11
   |
10 |     match ((0u8,),) {
   |           ^^^^^^^^^ pattern `((4_u8..=u8::MAX))` not covered
   |
   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
   = note: the matched value is of type `((u8,),)`

error[E0004]: non-exhaustive patterns: `(Some(2_u8..=u8::MAX))` not covered
  --> <anon>:14:11
   |
14 |     match (Some(0u8),) {
   |           ^^^^^^^^^^^^ pattern `(Some(2_u8..=u8::MAX))` not covered
   |
   = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
   = note: the matched value is of type `(Option<u8>,)`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0004`.
==============
@JohnTitor JohnTitor merged commit 828322e into master Dec 18, 2020
@JohnTitor JohnTitor deleted the autofix/ices/79569.sh branch December 18, 2020 13:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants