]>
Commit | Line | Data |
---|---|---|
dfeec247 | 1 | // build-fail |
476ff2be | 2 | // error-pattern: reached the type-length limit while instantiating |
064997fb | 3 | // compile-flags: -Copt-level=0 |
1b1a35ee | 4 | // normalize-stderr-test: ".nll/" -> "/" |
3157f602 | 5 | |
476ff2be | 6 | // Test that the type length limit can be changed. |
064997fb | 7 | // The exact type depends on optimizations, so disable them. |
a7813a04 | 8 | |
476ff2be | 9 | #![allow(dead_code)] |
6c58768f | 10 | #![type_length_limit="4"] |
476ff2be SL |
11 | |
12 | macro_rules! link { | |
13 | ($id:ident, $t:ty) => { | |
14 | pub type $id = ($t, $t, $t); | |
5bcae85e | 15 | } |
476ff2be SL |
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 } | |
5bcae85e | 24 | |
476ff2be SL |
25 | pub struct G; |
26 | ||
27 | fn main() { | |
28 | drop::<Option<A>>(None); | |
54a0048b | 29 | } |