2022-01-27 08:40:38 -06:00
|
|
|
// run-pass
|
2022-01-14 13:01:35 -06:00
|
|
|
#![feature(associated_const_equality)]
|
2022-01-27 08:40:38 -06:00
|
|
|
#![allow(unused)]
|
2022-01-14 13:01:35 -06:00
|
|
|
|
2021-07-30 03:56:45 -05:00
|
|
|
pub trait Foo {
|
|
|
|
const N: usize;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Bar;
|
|
|
|
|
|
|
|
impl Foo for Bar {
|
|
|
|
const N: usize = 3;
|
|
|
|
}
|
|
|
|
|
2022-01-08 03:28:12 -06:00
|
|
|
const TEST:usize = 3;
|
|
|
|
|
|
|
|
|
2022-01-27 08:40:38 -06:00
|
|
|
fn foo<F: Foo<N=3usize>>() {}
|
2022-01-08 03:28:12 -06:00
|
|
|
|
2022-01-27 08:40:38 -06:00
|
|
|
fn main() {
|
|
|
|
foo::<Bar>()
|
|
|
|
}
|