3 #![feature(const_trait_impl)]
11 fn foo() -> u8 where Self: ~const Bar {
12 <Self as Bar>::bar() * 6
19 impl Bar for NonConst {
25 impl Foo for NonConst {}
27 impl const Bar for Const {
33 impl const Foo for Const {}
36 const ANS1: u8 = Const::foo();
37 let ans2 = NonConst::foo();
39 assert_eq!(ANS1 + ans2, 42);