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

ices/73980.rs: fixed with errors #594

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#73980

struct X<P,Q>(P,Q);
struct L<T:?Sized>(T);

impl<T:?Sized> L<T>{
    const S: usize=1;
}

impl<T> X<T,[u8;L::<T>::S]> {}

fn main() {}
=== stdout ===
=== stderr ===
error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/73980.rs:8:21
  |
8 | impl<T> X<T,[u8;L::<T>::S]> {}
  |                     ^ cannot perform const operation using `T`
  |
  = note: type parameters may not be used in const expressions
  = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/73980.rs:8:21
  |
8 | impl<T> X<T,[u8;L::<T>::S]> {}
  |                     ^ cannot perform const operation using `T`
  |
  = note: type parameters may not be used in const expressions
  = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions

error: aborting due to previous error

==============
@Alexendoo Alexendoo deleted the autofix/ices/73980.rs branch January 2, 2021 14:07
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants