]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/const-projection-err.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / associated-type-bounds / const-projection-err.rs
1 // revisions: stock gce
2
3 #![feature(associated_const_equality)]
4 #![cfg_attr(gce, feature(generic_const_exprs))]
5 //[gce]~^ WARN the feature `generic_const_exprs` is incomplete
6
7 trait TraitWAssocConst {
8     const A: usize;
9 }
10
11 fn foo<T: TraitWAssocConst<A = 1>>() {}
12
13 fn bar<T: TraitWAssocConst<A = 0>>() {
14     foo::<T>();
15     //~^ ERROR type mismatch resolving `<T as TraitWAssocConst>::A == 1`
16 }
17
18 fn main() {}