1 // Issue 22443: Reject code using non-regular types that would
2 // otherwise cause dropck to loop infinitely.
4 use std
::marker
::PhantomData
;
10 struct Node
<T
:'
static> { m: PhantomData<&'static T> }
13 enum FingerTree
<T
:'
static> {
15 // Bug report said Digit after Box would stack overflow (versus
16 // Digit before Box; see dropck_no_diverge_on_nonregular_2).
18 Box
<FingerTree
<Node
<T
>>>,
24 let ft
= //~ ERROR overflow while adding drop-check rules for FingerTree
25 FingerTree
::Single(1);