]> git.proxmox.com Git - rustc.git/blame - src/test/ui/did_you_mean/recursion_limit.rs
New upstream version 1.35.0+dfsg1
[rustc.git] / src / test / ui / did_you_mean / recursion_limit.rs
CommitLineData
8bb4bdeb
XL
1// Test that the recursion limit can be changed and that the compiler
2// suggests a fix. In this case, we have deeply nested types that will
3// fail the `Send` check by overflow when the recursion limit is set
4// very low.
5
6#![allow(dead_code)]
7#![recursion_limit="10"]
8
9macro_rules! link {
10 ($id:ident, $t:ty) => {
11 enum $id { $id($t) }
12 }
13}
14
15link! { A, B }
16link! { B, C }
17link! { C, D }
18link! { D, E }
19link! { E, F }
20link! { F, G }
21link! { G, H }
22link! { H, I }
23link! { I, J }
24link! { J, K }
25link! { K, L }
26link! { L, M }
27link! { M, N }
28
29enum N { N(usize) }
30
31fn is_send<T:Send>() { }
32
33fn main() {
ff7c6d11 34 is_send::<A>(); //~ ERROR overflow evaluating the requirement
8bb4bdeb 35}