mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
16 lines
236 B
Rust
16 lines
236 B
Rust
pub trait TraitWAssocConst {
|
|
const A: usize;
|
|
}
|
|
pub struct Demo {}
|
|
|
|
impl TraitWAssocConst for Demo {
|
|
const A: usize = 32;
|
|
}
|
|
|
|
fn foo<A: TraitWAssocConst<A=32>>() {}
|
|
//~^ ERROR associated const equality
|
|
|
|
fn main() {
|
|
foo::<Demo>();
|
|
}
|