Skip to content

Commit 0c37404

Browse files
committed
Auto merge of rust-lang#18336 - xuwaters:patch-1, r=lnicola
Fix: Increase TOKEN_LIMIT in hir-expand Due to the `TOKEN_LIMIT`, rust-analyzer failed to expand macro for `web-sys::WebGl2RenderingContext` https://github.com/rustwasm/wasm-bindgen/blob/main/crates/web-sys/src/features/gen_WebGl2RenderingContext.rs <img width="780" alt="image" src="https://github.com/user-attachments/assets/3a39f18e-656e-43df-9994-0a0179fa42ac"> <img width="403" alt="image" src="https://github.com/user-attachments/assets/7ae8dcf9-a40a-4070-8623-dd3a953bbf45"> After increasing the `TOKEN_LIMIT`, the `web-sys::WebGl2RenderingContext` can be expanded successfully: <img width="459" alt="image" src="https://github.com/user-attachments/assets/76a71763-05a5-4f14-a5c9-61fc190c668f">
2 parents f075375 + 0590422 commit 0c37404

File tree

1 file changed

+1
-1
lines changed
  • src/tools/rust-analyzer/crates/hir-expand/src

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/crates/hir-expand/src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type MacroArgResult = (Arc<tt::Subtree>, SyntaxFixupUndoInfo, Span);
3535
/// an error will be emitted.
3636
///
3737
/// Actual max for `analysis-stats .` at some point: 30672.
38-
static TOKEN_LIMIT: Limit = Limit::new(1_048_576);
38+
static TOKEN_LIMIT: Limit = Limit::new(2_097_152);
3939

4040
#[derive(Debug, Clone, Eq, PartialEq)]
4141
pub enum TokenExpander {

0 commit comments

Comments
 (0)