File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ fn your_stack_belongs_to_me() {
52
52
cov_mark:: check!( your_stack_belongs_to_me) ;
53
53
lower (
54
54
r#"
55
+ #![recursion_limit = "32"]
55
56
macro_rules! n_nuple {
56
57
($e:tt) => ();
57
58
($($rest:tt)*) => {{
@@ -68,6 +69,7 @@ fn your_stack_belongs_to_me2() {
68
69
cov_mark:: check!( overflow_but_not_me) ;
69
70
lower (
70
71
r#"
72
+ #![recursion_limit = "32"]
71
73
macro_rules! foo {
72
74
() => {{ foo!(); foo!(); }}
73
75
}
@@ -78,8 +80,6 @@ fn main() { foo!(); }
78
80
79
81
#[ test]
80
82
fn recursion_limit ( ) {
81
- cov_mark:: check!( your_stack_belongs_to_me) ;
82
-
83
83
lower (
84
84
r#"
85
85
#![recursion_limit = "2"]
Original file line number Diff line number Diff line change @@ -1451,13 +1451,7 @@ impl DefCollector<'_> {
1451
1451
depth : usize ,
1452
1452
container : ItemContainerId ,
1453
1453
) {
1454
- let recursion_limit = self . def_map . recursion_limit ( ) as usize ;
1455
- let recursion_limit = Limit :: new ( if cfg ! ( test) {
1456
- // Without this, `body::tests::your_stack_belongs_to_me` stack-overflows in debug
1457
- std:: cmp:: min ( 32 , recursion_limit)
1458
- } else {
1459
- recursion_limit
1460
- } ) ;
1454
+ let recursion_limit = Limit :: new ( self . def_map . recursion_limit ( ) as usize ) ;
1461
1455
if recursion_limit. check ( depth) . is_err ( ) {
1462
1456
cov_mark:: hit!( macro_expansion_overflow) ;
1463
1457
tracing:: warn!( "macro expansion is too deep" ) ;
You can’t perform that action at this time.
0 commit comments