Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fatal error for functions with more than 65535 arguments
- Loading branch information
1 parent
97032a6
commit 804ccfa
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
macro_rules! many_args { | ||
([$($t:tt)*]#$($h:tt)*) => { | ||
many_args!{[$($t)*$($t)*]$($h)*} | ||
}; | ||
([$($t:tt)*]) => { | ||
fn _f($($t: ()),*) {} //~ ERROR function can not have more than 65535 arguments | ||
} | ||
} | ||
|
||
many_args!{[_]########## ######} | ||
|
||
fn main() {} |
13 changes: 13 additions & 0 deletions
13
src/test/ui/type/type-check/issue-88577-check-fn-with-more-than-65535-arguments.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
error: function can not have more than 65535 arguments | ||
--> $DIR/issue-88577-check-fn-with-more-than-65535-arguments.rs:6:24 | ||
| | ||
LL | fn _f($($t: ()),*) {} | ||
| ________________________^ | ||
LL | | } | ||
LL | | } | ||
LL | | | ||
LL | | many_args!{[_]########## ######} | ||
| |____________^ | ||
|
||
error: aborting due to previous error | ||
|