Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
5926: Bump token expansion limit
 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
  • Loading branch information
bors[bot] and matklad committed Sep 1, 2020
2 parents 5b21c7b + 7f54ded commit 754b4c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/hir_expand/src/db.rs
Expand Up @@ -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)))
Expand Down

0 comments on commit 754b4c9

Please sign in to comment.