mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
23 lines
253 B
Rust
23 lines
253 B
Rust
//@ run-pass
|
|
#![feature(associated_const_equality)]
|
|
#![allow(unused)]
|
|
|
|
pub trait Foo {
|
|
const N: usize;
|
|
}
|
|
|
|
pub struct Bar;
|
|
|
|
impl Foo for Bar {
|
|
const N: usize = 3;
|
|
}
|
|
|
|
const TEST:usize = 3;
|
|
|
|
|
|
fn foo<F: Foo<N=3usize>>() {}
|
|
|
|
fn main() {
|
|
foo::<Bar>()
|
|
}
|