1 // normalize-stderr-test: "<\[closure@.+`" -> "$$CLOSURE`"
5 #![recursion_limit = "20"]
6 #![type_length_limit = "20000000"]
7 #![crate_type = "rlib"]
13 pub fn matches<F: Fn()>(&self, f: &F) {
14 let &A(ref term) = self;
26 pub fn matches<F: Fn()>(&self, f: &F) {
28 &B::Variant2(ref factor) => {
29 factor.matches(&|| ())
40 pub fn matches<F: Fn()>(&self, f: &F) {
41 let &C(ref base) = self;
43 C(base.clone()).matches(f)
52 pub fn matches<F: Fn()>(&self, f: &F) {
53 //~^ ERROR reached the type-length limit while instantiating `D::matches::<[closure
60 A(B::Variant1).matches(&(|| ()))