rust/tests/ui/const-generics/issues/issue-86535-2.rs
Michael Goulet 5f5b4ee128 Revert "Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix"
This reverts commit 31fe9628cf830a08e7194a446f66c668aaea86e9, reversing
changes made to f20307851ead9fbbb9fa88bbffb3258a069230a6.
2024-08-03 07:57:31 -04:00

25 lines
452 B
Rust

//@ run-pass
#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
#![allow(incomplete_features)]
pub trait Foo {
const ASSOC_C: usize;
fn foo()
where
[(); Self::ASSOC_C]:;
}
struct Bar<const N: &'static ()>;
impl<const N: &'static ()> Foo for Bar<N> {
const ASSOC_C: usize = 3;
fn foo()
where
[u8; Self::ASSOC_C]:,
{
let _: [u8; Self::ASSOC_C] = loop {};
}
}
fn main() {}