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

ices/58987-4.rs: fixed with errors #580

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#58987

pub struct Matrix<T, const R: usize, const C: usize> {
    inner: [T; R * C]
}

fn main() {}
=== stdout ===
=== stderr ===
error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/58987-4.rs:2:16
  |
2 |     inner: [T; R * C]
  |                ^ cannot perform const operation using `R`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `R`
  = 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/58987-4.rs:2:20
  |
2 |     inner: [T; R * C]
  |                    ^ cannot perform const operation using `C`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `C`
  = 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/58987-4.rs:2:16
  |
2 |     inner: [T; R * C]
  |                ^ cannot perform const operation using `R`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `R`
  = 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/58987-4.rs:2:20
  |
2 |     inner: [T; R * C]
  |                    ^ cannot perform const operation using `C`
  |
  = help: const parameters may only be used as standalone arguments, i.e. `C`
  = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: aborting due to 2 previous errors

==============
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.

This one seems to be uncovered but some issues should cover, I presume.

@Alexendoo Alexendoo deleted the autofix/ices/58987-4.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