]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/constifconst-call-in-const-position.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / consts / constifconst-call-in-const-position.rs
1 // known-bug: #102498
2
3 #![feature(const_trait_impl, generic_const_exprs)]
4
5 #[const_trait]
6 pub trait Tr {
7     fn a() -> usize;
8 }
9
10 impl Tr for () {
11     fn a() -> usize {
12         1
13     }
14 }
15
16 const fn foo<T: ~const Tr>() -> [u8; T::a()] {
17     [0; T::a()]
18 }
19
20 fn main() {
21     foo::<()>();
22 }