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

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Aug 9, 2023

Issue: rust-lang/rust#113375

#![feature(effects)]

struct Bar<T>(T);

impl<T> Bar<T> {
    const fn value() -> usize {
        42
    }
}

struct Foo<const N: [u8; Bar::<u32>::value()]>;

fn main() {}
=== stdout ===
=== stderr ===
error: `[u8; Bar::<u32>::value()]` is forbidden as the type of a const generic parameter
  --> /home/runner/work/glacier/glacier/ices/113375.rs:11:21
   |
11 | struct Foo<const N: [u8; Bar::<u32>::value()]>;
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(adt_const_params)]`

error: aborting due to previous error

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

=== stdout ===
=== stderr ===
error: `[u8; Bar::<u32>::value()]` is forbidden as the type of a const generic parameter
  --> /home/runner/work/glacier/glacier/ices/113375.rs:11:21
   |
11 | struct Foo<const N: [u8; Bar::<u32>::value()]>;
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(adt_const_params)]`

error: aborting due to previous error

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