rust/tests/ui/associated-consts/projection-unspecified-but-bounded.rs

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

17 lines
289 B
Rust
Raw Normal View History

#![feature(associated_const_equality)]
// Issue 110549
pub trait TraitWAssocConst {
const A: usize;
}
fn foo<T: TraitWAssocConst<A = 32>>() {}
fn bar<T: TraitWAssocConst>() {
foo::<T>();
//~^ ERROR type mismatch resolving `<T as TraitWAssocConst>::A == 32`
}
fn main() {}