1 // Checking the `Send` bound in `main` requires:
3 // checking <C<'static> as Y>::P: Send
4 // which normalizes to Box<X<C<'?1>>>: Send
5 // which needs X<C<'?1>>: Send
6 // which needs <C<'?1> as Y>::P: Send
8 // At this point we used to normalize the predicate to `Box<X<C<'?2>>>: Send`
9 // and continue in a loop where we created new region variables to the
10 // recursion limit. To avoid this we now "canonicalize" region variables to
11 // lowest unified region vid. This means we instead have to prove
12 // `Box<X<C<'?1>>>: Send`, which we can because auto traits are coinductive.
16 // Avoid a really long error message if this regresses.
17 #![recursion_limit="20"]
23 impl<'a> Y for C<'a> {
24 type P = Box<X<C<'a>>>;
30 fn is_send<S: Send>() {}
33 is_send::<X<C<'static>>>();