1 // Regression test for issue #83538. The problem here is that we have
4 // * `Ty` embeds `Box<Ty>` indirectly, which depends on `Global: 'static`, which is OkModuloRegions.
5 // * But `Ty` also references `First`, which has a cycle on itself. That should just be `Ok`.
7 // But our caching mechanism was blending both cycles and giving the incorrect result.
9 #![feature(rustc_attrs)]
25 j(Fourth, Fifth, Sixth),
40 #[rustc_evaluate_where_clauses]
48 #[rustc_evaluate_where_clauses]
57 // Key is that Vec<First> is "ok" and Third<'_, Ty> is "ok modulo regions":
60 //~^ ERROR evaluate(Binder(TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), [])) = Ok(EvaluatedToOk)
61 //~| ERROR evaluate(Binder(TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), [])) = Ok(EvaluatedToOkModuloRegions)
64 //~^ ERROR evaluate(Binder(TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), [])) = Ok(EvaluatedToOk)
65 //~| ERROR evaluate(Binder(TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), [])) = Ok(EvaluatedToOkModuloRegions)