File tree 2 files changed +63
-15
lines changed
2 files changed +63
-15
lines changed Original file line number Diff line number Diff line change @@ -3120,12 +3120,7 @@ impl Parser {
3120
3120
// > …
3121
3121
// >
3122
3122
// > Maximum nesting depth of brace-enclosed statements in a function[:] 127
3123
- //
3124
- // _However_, we choose 64 instead because (a) it avoids stack overflows in CI and
3125
- // (b) we expect the limit to be decreased to 63 based on this conversation in
3126
- // WebGPU CTS upstream:
3127
- // <https://github.com/gpuweb/cts/pull/3389#discussion_r1543742701>
3128
- const BRACE_NESTING_MAXIMUM : u8 = 64 ;
3123
+ const BRACE_NESTING_MAXIMUM : u8 = 127 ;
3129
3124
if brace_nesting_level + 1 > BRACE_NESTING_MAXIMUM {
3130
3125
return Err ( Box :: new ( Error :: ExceededLimitForNestedBraces {
3131
3126
span : brace_span,
Original file line number Diff line number Diff line change @@ -2699,12 +2699,12 @@ fn limit_braced_statement_nesting() {
2699
2699
let too_many_braces = "fn f() {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{" ;
2700
2700
2701
2701
let expected_diagnostic = r###"error: brace nesting limit reached
2702
- ┌─ wgsl:1:72
2702
+ ┌─ wgsl:1:135
2703
2703
│
2704
2704
1 │ fn f() {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
2705
- │ ^ limit reached at this brace
2705
+ │ ^ limit reached at this brace
2706
2706
│
2707
- = note: nesting limit is currently set to 64
2707
+ = note: nesting limit is currently set to 127
2708
2708
2709
2709
"### ;
2710
2710
@@ -2796,16 +2796,69 @@ fn too_many_unclosed_loops() {
2796
2796
loop {
2797
2797
loop {
2798
2798
loop {
2799
+ loop {
2800
+ loop {
2801
+ loop {
2802
+ loop {
2803
+ loop {
2804
+ loop {
2805
+ loop {
2806
+ loop {
2807
+ loop {
2808
+ loop {
2809
+ loop {
2810
+ loop {
2811
+ loop {
2812
+ loop {
2813
+ loop {
2814
+ loop {
2815
+ loop {
2816
+ loop {
2817
+ loop {
2818
+ loop {
2819
+ loop {
2820
+ loop {
2821
+ loop {
2822
+ loop {
2823
+ loop {
2824
+ loop {
2825
+ loop {
2826
+ loop {
2827
+ loop {
2828
+ loop {
2829
+ loop {
2830
+ loop {
2831
+ loop {
2832
+ loop {
2833
+ loop {
2834
+ loop {
2835
+ loop {
2836
+ loop {
2837
+ loop {
2838
+ loop {
2839
+ loop {
2840
+ loop {
2841
+ loop {
2842
+ loop {
2843
+ loop {
2844
+ loop {
2845
+ loop {
2846
+ loop {
2847
+ loop {
2848
+ loop {
2849
+ loop {
2850
+ loop {
2851
+ loop {
2799
2852
loop {
2800
2853
" ;
2801
2854
2802
2855
let expected_diagnostic = r###"error: brace nesting limit reached
2803
- ┌─ wgsl:65 :13
2804
- │
2805
- 65 │ loop {
2806
- │ ^ limit reached at this brace
2807
- │
2808
- = note: nesting limit is currently set to 64
2856
+ ┌─ wgsl:128 :13
2857
+ │
2858
+ 128 │ loop {
2859
+ │ ^ limit reached at this brace
2860
+ │
2861
+ = note: nesting limit is currently set to 127
2809
2862
2810
2863
"### ;
2811
2864
You can’t perform that action at this time.
0 commit comments