The Wire · Showcase
RUST-ANALYZER REWRITES MACRO EXPANSION INTERNALS, COMPILER PREDICATE CLEANUP LANDS
By RepoJournal · Filed · About Rust
Rust-analyzer stripped out another batch of legacy `ExpandDatabase` queries overnight while the compiler team tackled redundant predicate handling in type checking.
The rust-analyzer team is methodically removing deprecated query group patterns, merging three separate PRs that eliminate `ExpandDatabase` queries [1] [2] [3] and refactor macro expansion methods for consistency [4]. This is part of a larger internal cleanup tracked in the analyzer's issue backlog. Meanwhile, the compiler team landed a predicate cleanup PR [5] that removes code paths treating generic predicates as clauses when only clauses are actually valid, tightening type system invariants. A rollup of 19 fixes also shipped [6], including view-type AST support, Enzyme on Apple silicon, and delegation improvements. The rust-analyzer subtree synchronized with the main compiler [7], and an allocator safety rewrite landed [8] defining "equivalent allocators" for stdlib correctness guarantees.
One email a day. Unsubscribe in one click.
Keep up with Rust in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review rust-analyzer nightly for macro expansion changes if you maintain IDE integrations rust-lang/rust-analyzer [plan]
- → Check allocator implementations against new safety definitions in std docs rust-lang/rust [plan]
References
- [1] internal: remove some more `ExpandDatabase` queries ↗ rust-lang/rust-analyzer
- [2] internal: migrate `ExpandDatabase::*span_map` queries ↗ rust-lang/rust-analyzer
- [3] Merge pull request #22719 from ada4a/unquerygroup-macro_call_id-and-hir_file_id-methods rust-lang/rust-analyzer
- [4] internal: make `expand_speculative` a method on `MacroCallId` ↗ rust-lang/rust-analyzer
- [5] Predicate/clause cleanups ↗ rust-lang/rust
- [6] Rollup of 19 pull requests ↗ rust-lang/rust
- [7] `rust-analyzer` subtree update ↗ rust-lang/rust
- [8] Rollup merge of #157801 - theemathas:allocator-safety-rewrite, r=Amanieu rust-lang/rust