Open lcnr opened 4 months ago
struct MyType<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h> { is_static: SendIfStatic<'a>, rot: Option<Box<MyType<'b, 'c, 'd, 'e, 'f, 'g, 'h, 'a>>>, } struct SendIfStatic<'a>(&'a ()); unsafe impl Send for SendIfStatic<'static> {} fn is_send<T: Send>(x: T) {} fn main() { let is_static = SendIfStatic(&()); is_send(MyType { is_static, rot: None, }) }
this compiles with the old solver and overflows with new. https://rust.godbolt.org/z/v9bMKM5T4
This only affects cases where coinductive cycles include goals with more constraints than the struct definition, so it may not matter in practice
this compiles with the old solver and overflows with new. https://rust.godbolt.org/z/v9bMKM5T4