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

ices/90150.rs: fixed with errors #1017

Closed
wants to merge 1 commit into from
Closed

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#90150

#![feature(inline_const)]
#![feature(generic_const_exprs)]

const fn foo(val: usize) -> usize { val }

fn bar<const N: usize>(num: usize) -> &'static str
where [(); foo(N)]:
{
    match num {
        const { foo(N) } => "fizz",
        _ => "buzz"
    }
}

pub fn main() {}
=== stdout ===
=== stderr ===
error[E0658]: inline-const in pattern position is experimental
  --> /home/runner/work/glacier/glacier/ices/90150.rs:10:9
   |
10 |         const { foo(N) } => "fizz",
   |         ^^^^^
   |
   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable

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

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
error[E0658]: inline-const in pattern position is experimental
  --> /home/runner/work/glacier/glacier/ices/90150.rs:10:9
   |
10 |         const { foo(N) } => "fizz",
   |         ^^^^^
   |
   = note: see issue #76001 <rust-lang/rust#76001> for more information
   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable

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

error: aborting due to previous error; 1 warning emitted

For more information about this error, try `rustc --explain E0658`.
==============
@Alexendoo
Copy link
Member

closed by dfefde9

@Alexendoo Alexendoo closed this Nov 24, 2021
@Alexendoo Alexendoo deleted the autofix/ices/90150.rs branch November 24, 2021 12:24
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