]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type_length_limit.rs
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / type_length_limit.rs
1 // build-fail
2 // error-pattern: reached the type-length limit while instantiating
3 // compile-flags: -Copt-level=0
4 // normalize-stderr-test: ".nll/" -> "/"
5
6 // Test that the type length limit can be changed.
7 // The exact type depends on optimizations, so disable them.
8
9 #![allow(dead_code)]
10 #![type_length_limit="4"]
11
12 macro_rules! link {
13     ($id:ident, $t:ty) => {
14         pub type $id = ($t, $t, $t);
15     }
16 }
17
18 link! { A, B }
19 link! { B, C }
20 link! { C, D }
21 link! { D, E }
22 link! { E, F }
23 link! { F, G }
24
25 pub struct G;
26
27 fn main() {
28     drop::<Option<A>>(None);
29 }