rustc_ast 是Rust 编译器内部的一个 crate,它主要用于解析和处理 Rust 代码。由于它是 Rust 编译器的一部分,因此并不作为一个独立的 crate 在 crates.io 上发布。这意味着你不能直接在 Cargo.toml 文件中通过 rustc_ast = "x.y.z" 的方式来添加依赖。 检查Rust编译器版本与rustc_ast的兼容性: 由于rust...
Empowering everyone to build reliable and efficient software. - rust/compiler/rustc_ast_passes/Cargo.toml at 2d24fe591f30386d6d5fc2bb941c78d7266bf10f · rust-lang/rust
} 为了进行这种转换,我想首先从C源代码生成一个AST,然后对AST中的元素进行重新排序,最后通过访问树来打印转换后的代码。 我不想自己写解析器,所以我正在寻找一个Rust板条箱来为我生成AST。因为这个工具只关心小范围代码中的代码转换,所以板条箱最好不执行语义检查,只专注于生成AST。 我尝试了lang-c,但它似乎执行...
I think it simplifies the crate graph and also exposes people less to confusion if downstream crates don't interact withrustc_ast_irdirectly and instead just use its functionality reexported through more familiar paths. Some changes occurred to the core trait solver cc @rust-lang/initiative-trait...
为了进行此转换,我想首先从 C 源代码生成 AST,然后对 AST 中的元素重新排序,最后通过访问树来打印转换后的代码。我不想自己编写解析器,所以我正在寻找一个 Rust 箱来为我生成 AST。因为这个工具只关心小范围代码中的代码转换,所以最好 crate 不进行语义检查,只专注于生成 AST。
repository link (if public, optional): rustc repro: I have none, since it happens when editing code in the codebase. Every 5 minutes or so, rust-analyzer catastrophically begins failing with: thread 'Worker' panicked at crates/span/src/ast_id.rs:226:21: ...
- name: Install rust toolchain uses: actions-rs/toolchain@v1 with: components: rustfmt, clippy - name: Cache uses: actions/cache@v4 with: 3 changes: 1 addition & 2 deletions 3 .github/workflows/pypi.yml Original file line numberDiff line numberDiff line change @@ -40,7 +40,6 @@ ...
Empowering everyone to build reliable and efficient software. - Inject `compiler_builtins` during postprocessing rather than via AST · rust-lang/rust@4bd1a8c
⚡A CLI tool for code structural search, lint and rewriting. Written in Rust - chore(deps): update rust crate anyhow to v1.0.94 · ast-grep/ast-grep@27c0226
Empowering everyone to build reliable and efficient software. - compiler: gate `extern "{abi}"` in ast_lowering · rust-lang/rust@5d7c093