diff options
author | Aleksey Kladov <[email protected]> | 2020-09-01 13:55:41 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-09-01 13:55:41 +0100 |
commit | 7f54ded71bc36d7eabc6a96c4f25f5c266db633e (patch) | |
tree | d6bd85267e8109400473b1a757c2fa2dcbe4ee4d /crates | |
parent | 5b21c7b0e5af305269ba2568a364da75d74f83e5 (diff) |
Bump token expansion limit
We hit this for redis crate, reported at
Reported at
https://www.reddit.com/r/rust/comments/ikfsf8/rustanalyzer_doesnt_work_with_the_redis_crate/
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))) |