]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type_length_limit.rs
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / type_length_limit.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // error-pattern: reached the type-length limit while instantiating
12
13 // Test that the type length limit can be changed.
14
15 #![allow(dead_code)]
16 #![type_length_limit="256"]
17
18 macro_rules! link {
19     ($id:ident, $t:ty) => {
20         pub type $id = ($t, $t, $t);
21     }
22 }
23
24 link! { A, B }
25 link! { B, C }
26 link! { C, D }
27 link! { D, E }
28 link! { E, F }
29 link! { F, G }
30
31 pub struct G;
32
33 fn main() {
34     drop::<Option<A>>(None);
35 }