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

ices/66706-2.rs: fixed with errors #330

Merged
merged 1 commit into from
Apr 16, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#66706

fn bug() {
    [0; match [|f @ &ref _| () ] {} ]
}

fn main() {}
=== stdout ===
=== stderr ===
error: expected identifier, found reserved identifier `_`
 --> /home/runner/work/glacier/glacier/ices/66706-2.rs:2:26
  |
2 |     [0; match [|f @ &ref _| () ] {} ]
  |                          ^ expected identifier, found reserved identifier

error[E0658]: `match` is not allowed in a `const`
 --> /home/runner/work/glacier/glacier/ices/66706-2.rs:2:9
  |
2 |     [0; match [|f @ &ref _| () ] {} ]
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #49146 <https://github.com/rust-lang/rust/issues/49146> for more information
  = help: add `#![feature(const_if_match)]` to the crate attributes to enable

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/66706-2.rs:2:5
  |
1 | fn bug() {
  |          - help: try adding a return type: `-> [{integer}; _]`
2 |     [0; match [|f @ &ref _| () ] {} ]
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error: expected identifier, found reserved identifier `_`
 --> /home/runner/work/glacier/glacier/ices/66706-2.rs:2:26
  |
2 |     [0; match [|f @ &ref _| () ] {} ]
  |                          ^ expected identifier, found reserved identifier

error[E0658]: `match` is not allowed in a `const`
 --> /home/runner/work/glacier/glacier/ices/66706-2.rs:2:9
  |
2 |     [0; match [|f @ &ref _| () ] {} ]
  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #49146 <rust-lang/rust#49146> for more information
  = help: add `#![feature(const_if_match)]` to the crate attributes to enable

error[E0308]: mismatched types
 --> /home/runner/work/glacier/glacier/ices/66706-2.rs:2:5
  |
1 | fn bug() {
  |          - help: try adding a return type: `-> [{integer}; _]`
2 |     [0; match [|f @ &ref _| () ] {} ]
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.
==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fixed.

@JohnTitor JohnTitor merged commit c0bfaf9 into master Apr 16, 2020
@JohnTitor JohnTitor deleted the autofix/ices/66706-2.rs branch April 16, 2020 12:25
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