]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type_length_limit.rs
Rollup merge of #93112 - pietroalbini:pa-cve-2022-21658-nightly, r=pietroalbini
[rust.git] / src / test / ui / type_length_limit.rs
1 // build-fail
2 // error-pattern: reached the type-length limit while instantiating
3 // normalize-stderr-test: ".nll/" -> "/"
4
5 // Test that the type length limit can be changed.
6
7 #![allow(dead_code)]
8 #![type_length_limit="4"]
9
10 macro_rules! link {
11     ($id:ident, $t:ty) => {
12         pub type $id = ($t, $t, $t);
13     }
14 }
15
16 link! { A, B }
17 link! { B, C }
18 link! { C, D }
19 link! { D, E }
20 link! { E, F }
21 link! { F, G }
22
23 pub struct G;
24
25 fn main() {
26     drop::<Option<A>>(None);
27 }