3 // FIXME: This test should fail since, within a const impl of `Foo`, the bound on `Foo::Bar` should
4 // require a const impl of `Add` for the associated type.
6 #![feature(const_trait_impl)]
8 struct NonConstAdd(i32);
10 impl std::ops::Add for NonConstAdd {
13 fn add(self, rhs: Self) -> Self {
14 NonConstAdd(self.0 + rhs.0)
19 type Bar: std::ops::Add;
22 impl const Foo for NonConstAdd {
23 type Bar = NonConstAdd;