]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type_length_limit.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / type_length_limit.rs
CommitLineData
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
12macro_rules! link {
13 ($id:ident, $t:ty) => {
14 pub type $id = ($t, $t, $t);
5bcae85e 15 }
476ff2be
SL
16}
17
18link! { A, B }
19link! { B, C }
20link! { C, D }
21link! { D, E }
22link! { E, F }
23link! { F, G }
5bcae85e 24
476ff2be
SL
25pub struct G;
26
27fn main() {
28 drop::<Option<A>>(None);
54a0048b 29}