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

ices/78174.rs: fixed with errors #1009

Merged
merged 1 commit into from
Nov 10, 2021
Merged

ices/78174.rs: fixed with errors #1009

merged 1 commit into from
Nov 10, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#78174

#![allow(incomplete_features)]
#![feature(inline_const)]

fn main() {
    let const { "foo" } = "foo";
}
=== stdout ===
=== stderr ===
error[E0005]: refutable pattern in local binding: `&_` not covered
 --> /home/runner/work/glacier/glacier/ices/78174.rs:5:9
  |
5 |     let const { "foo" } = "foo";
  |         ^^^^^^^^^^^^^^^ pattern `&_` not covered
  |
  = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
  = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
  = note: the matched value is of type `&str`
help: you might want to use `if let` to ignore the variant that isn't matched
  |
5 |     if let const { "foo" } = "foo" { /* */ }
  |

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error[E0005]: refutable pattern in local binding: `&_` not covered
 --> /home/runner/work/glacier/glacier/ices/78174.rs:5:9
  |
5 |     let const { "foo" } = "foo";
  |         ^^^^^^^^^^^^^^^ pattern `&_` not covered
  |
  = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
  = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
  = note: the matched value is of type `&str`
help: you might want to use `if let` to ignore the variant that isn't matched
  |
5 |     if let const { "foo" } = "foo" { /* */ }
  |

error: aborting due to previous error

For more information about this error, try `rustc --explain E0005`.
==============
@Alexendoo Alexendoo merged commit e9ee130 into master Nov 10, 2021
@Alexendoo Alexendoo deleted the autofix/ices/78174.rs branch November 10, 2021 13:03
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