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> }
12 enum FingerTree<T:'static> {
14 // Bug report said Digit before Box would infinite loop (versus
15 // Digit after Box; see dropck_no_diverge_on_nonregular_1).
18 Box<FingerTree<Node<T>>>,
23 let ft = //~ ERROR overflow while adding drop-check rules for FingerTree
24 FingerTree::Single(1);
25 //~^ ERROR overflow while adding drop-check rules for FingerTree