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

ices/69913.rs: fixed with errors #590

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#69913

fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}

fn main() {}
=== stdout ===
=== stderr ===
error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/69913.rs:1:53
  |
1 | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
  |                                                     ^ cannot perform const operation using `A`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `A`
  = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/69913.rs:1:57
  |
1 | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
  |                                                         ^ cannot perform const operation using `B`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `B`
  = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: aborting due to 2 previous errors

==============

=== stdout ===
=== stderr ===
error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/69913.rs:1:53
  |
1 | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
  |                                                     ^ cannot perform const operation using `A`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `A`
  = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/69913.rs:1:57
  |
1 | fn foo<const A: usize, const B: usize>(bar: [usize; A + B]) {}
  |                                                         ^ cannot perform const operation using `B`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `B`
  = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: aborting due to 2 previous errors

==============
@Alexendoo Alexendoo deleted the autofix/ices/69913.rs branch January 2, 2021 14:07
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