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

ices/92100-1.rs: fixed with errors #1070

Merged
merged 1 commit into from
Dec 30, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#92100

fn main() {
    match &vec![0] {
        [a..1, a, a..1] | _ => {}
    }
}
=== stdout ===
=== stderr ===
error[E0408]: variable `a` is not bound in all patterns
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:27
  |
3 |         [a..1, a, a..1] | _ => {}
  |                -          ^ pattern doesn't bind `a`
  |                |
  |                variable not in all patterns

error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:10
  |
3 |         [a..1, a, a..1] | _ => {}
  |          ^ not found in this scope

error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:19
  |
3 |         [a..1, a, a..1] | _ => {}
  |                   ^ not found in this scope

error[E0658]: exclusive range pattern syntax is experimental
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:10
  |
3 |         [a..1, a, a..1] | _ => {}
  |          ^^^^
  |
  = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
  = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable

error[E0658]: exclusive range pattern syntax is experimental
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:19
  |
3 |         [a..1, a, a..1] | _ => {}
  |                   ^^^^
  |
  = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
  = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable

error[E0529]: expected an array or slice, found `Vec<{integer}>`
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:9
  |
2 |     match &vec![0] {
  |           -------- help: consider slicing here: `&vec![0][..]`
3 |         [a..1, a, a..1] | _ => {}
  |         ^^^^^^^^^^^^^^^ pattern cannot match with input type `Vec<{integer}>`

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0408, E0425, E0529, E0658.
For more information about an error, try `rustc --explain E0408`.
==============

=== stdout ===
=== stderr ===
error[E0408]: variable `a` is not bound in all patterns
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:27
  |
3 |         [a..1, a, a..1] | _ => {}
  |                -          ^ pattern doesn't bind `a`
  |                |
  |                variable not in all patterns

error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:10
  |
3 |         [a..1, a, a..1] | _ => {}
  |          ^ not found in this scope

error[E0425]: cannot find value `a` in this scope
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:19
  |
3 |         [a..1, a, a..1] | _ => {}
  |                   ^ not found in this scope

error[E0658]: exclusive range pattern syntax is experimental
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:10
  |
3 |         [a..1, a, a..1] | _ => {}
  |          ^^^^
  |
  = note: see issue #37854 <rust-lang/rust#37854> for more information
  = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable

error[E0658]: exclusive range pattern syntax is experimental
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:19
  |
3 |         [a..1, a, a..1] | _ => {}
  |                   ^^^^
  |
  = note: see issue #37854 <rust-lang/rust#37854> for more information
  = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable

error[E0529]: expected an array or slice, found `Vec<{integer}>`
 --> /home/runner/work/glacier/glacier/ices/92100-1.rs:3:9
  |
2 |     match &vec![0] {
  |           -------- help: consider slicing here: `&vec![0][..]`
3 |         [a..1, a, a..1] | _ => {}
  |         ^^^^^^^^^^^^^^^ pattern cannot match with input type `Vec<{integer}>`

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0408, E0425, E0529, E0658.
For more information about an error, try `rustc --explain E0408`.
==============
@Alexendoo Alexendoo merged commit 93f1b0c into master Dec 30, 2021
@Alexendoo Alexendoo deleted the autofix/ices/92100-1.rs branch December 30, 2021 12:19
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