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

ices/82518.rs: fixed with errors #944

Merged
merged 1 commit into from
Aug 30, 2021
Merged

ices/82518.rs: fixed with errors #944

merged 1 commit into from
Aug 30, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#82518

#![crate_type = "lib"]
#![feature(inline_const)]

fn foo<const V: usize>() {
  match 0 {
    const { V } => {},
    _ => {},
  }
}
=== stdout ===
=== stderr ===
warning: the feature `inline_const` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/82518.rs:2:12
  |
2 | #![feature(inline_const)]
  |            ^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information

error[E0158]: const parameters cannot be referenced in patterns
 --> /home/runner/work/glacier/glacier/ices/82518.rs:6:11
  |
6 |     const { V } => {},
  |           ^^^^^

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: the feature `inline_const` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/82518.rs:2:12
  |
2 | #![feature(inline_const)]
  |            ^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #76001 <rust-lang/rust#76001> for more information

error[E0158]: const parameters cannot be referenced in patterns
 --> /home/runner/work/glacier/glacier/ices/82518.rs:6:11
  |
6 |     const { V } => {},
  |           ^^^^^

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0158`.
==============
@JohnTitor JohnTitor merged commit 7c28281 into master Aug 30, 2021
@JohnTitor JohnTitor deleted the autofix/ices/82518.rs branch August 30, 2021 13:36
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