]>
git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/recursion_limit.rs
1 // Copyright 2014 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.
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.
11 // Test that the recursion limit can be changed. In this case, we have
12 // deeply nested types that will fail the `Send` check by overflow
13 // when the recursion limit is set very low.
16 #![recursion_limit="10"]
19 ($id
:ident
, $t
:ty
) => {
40 fn is_send
<T
:Send
>() { }
44 //~^ ERROR overflow evaluating
45 //~| NOTE consider adding a `#![recursion_limit="20"]` attribute to your crate
46 //~| NOTE required because it appears within the type `A`
47 //~| NOTE required because it appears within the type `B`
48 //~| NOTE required because it appears within the type `C`
49 //~| NOTE required because it appears within the type `D`
50 //~| NOTE required because it appears within the type `E`
51 //~| NOTE required because it appears within the type `F`
52 //~| NOTE required because it appears within the type `G`
53 //~| NOTE required because it appears within the type `H`
54 //~| NOTE required because it appears within the type `I`
55 //~| NOTE required because it appears within the type `J`
56 //~| NOTE required by `is_send`