// Regression test for issue #55001. Previously, we would incorrectly // cache certain trait selection results when checking for blanket impls, // resulting in an ICE when we tried to confirm the cached ParamCandidate // against an obligation. pub struct DefaultAllocator; pub struct Standard; pub struct Inner; pub trait Rand {} pub trait Distribution {} pub trait Allocator {} impl Rand for T where Standard: Distribution {} impl Distribution> for Standard where DefaultAllocator: Allocator, Standard: Distribution {} impl Distribution for Standard {} pub struct Point where DefaultAllocator: Allocator { field: N } fn main() {}