5926: Bump token expansion limit
 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-09-01 12:57:28 +00:00 committed by GitHub
commit 754b4c900e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -223,7 +223,7 @@ fn macro_expand_with_arg(
let ExpandResult(tt, err) = macro_rules.0.expand(db, lazy_id, &macro_arg.0);
// Set a hard limit for the expanded tt
let count = tt.count();
if count > 65536 {
if count > 262144 {
return (None, Some(format!("Total tokens count exceed limit : count = {}", count)));
}
(Some(Arc::new(tt)), err.map(|e| format!("{:?}", e)))