diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-09-01 13:57:28 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-01 13:57:28 +0100 |
commit | 754b4c900e843060b25acd63e5de1898eb66a59f (patch) | |
tree | d6bd85267e8109400473b1a757c2fa2dcbe4ee4d /crates | |
parent | 5b21c7b0e5af305269ba2568a364da75d74f83e5 (diff) | |
parent | 7f54ded71bc36d7eabc6a96c4f25f5c266db633e (diff) |
Merge #5926
5926: Bump token expansion limit
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/hir_expand/src/db.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index dcc038bcd..710694a34 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs | |||
@@ -223,7 +223,7 @@ fn macro_expand_with_arg( | |||
223 | let ExpandResult(tt, err) = macro_rules.0.expand(db, lazy_id, ¯o_arg.0); | 223 | let ExpandResult(tt, err) = macro_rules.0.expand(db, lazy_id, ¯o_arg.0); |
224 | // Set a hard limit for the expanded tt | 224 | // Set a hard limit for the expanded tt |
225 | let count = tt.count(); | 225 | let count = tt.count(); |
226 | if count > 65536 { | 226 | if count > 262144 { |
227 | return (None, Some(format!("Total tokens count exceed limit : count = {}", count))); | 227 | return (None, Some(format!("Total tokens count exceed limit : count = {}", count))); |
228 | } | 228 | } |
229 | (Some(Arc::new(tt)), err.map(|e| format!("{:?}", e))) | 229 | (Some(Arc::new(tt)), err.map(|e| format!("{:?}", e))) |