3 #![feature(const_trait_impl)]
12 fn foo() -> u8 where Self: ~const Bar {
13 <Self as Bar>::bar() * 6
20 impl Bar for NonConst {
26 impl Foo for NonConst {}
28 impl const Bar for Const {
34 impl const Foo for Const {}
37 const ANS1: u8 = Const::foo();
38 let ans2 = NonConst::foo();
40 assert_eq!(ANS1 + ans2, 42);