2 // compile-flags: -Ztrait-solver=next
4 // normalize-stderr-test "note: .*\n\n" -> ""
5 // normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
6 // rustc-env:RUST_BACKTRACE=0
8 // This tests checks that we update results in the provisional cache when
9 // we pop a goal from the stack.
10 #![feature(auto_traits)]
11 auto trait Coinductive {}
15 impl<T> Coinductive for Foo<T>
20 impl<T> Coinductive for Bar<T>
23 Bar<T>: ConstrainInfer,
26 trait ConstrainInfer {}
27 impl ConstrainInfer for Bar<u8> {}
28 impl ConstrainInfer for Foo<u16> {}
30 fn impls<T: Coinductive>() -> T { todo!() }
32 fn constrain<T: ConstrainInfer>(_: T) {}
35 // This should constrain `_` to `u8`.