rust/tests/ui/feature-gates/feature-gate-associated_const_equality.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
236 B
Rust
Raw Normal View History

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>();
}