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