From 7f54ded71bc36d7eabc6a96c4f25f5c266db633e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 1 Sep 2020 14:55:41 +0200 Subject: 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/ --- crates/hir_expand/src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_expand') 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( let ExpandResult(tt, err) = macro_rules.0.expand(db, lazy_id, ¯o_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))) -- cgit v1.2.3