Rust

Rust: Spring Cleaning & Closure Revival

The Rust team had a productive day with 16 merged PRs focusing on code organization and feature improvements. Major highlights include a complete reimplementation of const closures by oli-obk, significant cleanup of derive tests, and stricter validation of LLVM ABI values across target specifications.

Duration: PT3M53S

https://podlog.io/listen/rust-ffe93d3a/episode/rust-spring-cleaning-closure-revival-b627de31

Transcript

Hey there, Rustaceans! Welcome back to another episode of the Rust podcast. It's March 15th, 2026, and wow - what a day we had yesterday! The team was absolutely on fire with 16 merged pull requests. It feels like the perfect spring cleaning session mixed with some exciting feature work.

Let's dive right into the big story - oli-obk just shipped a complete reimplementation of const closures! This is tracking issue 106003, and it's one of those changes that makes you appreciate the thoughtful engineering that goes into Rust. The fascinating part here is that the old solver couldn't handle those fancy `for<'a> |x: &'a()| ()` closures in const contexts, but since that feature is still unstable anyway, they're letting the next-generation solver take care of it. It's like passing the torch to the next runner in a relay race - clean handoff, smart strategy.

The team also had a fantastic cleanup day. cyrgani has been doing the Lord's work, cleaning up our test suite. They merged and streamlined all those derive span tests - you know, the ones that make sure when you get a derive error, it points exactly at the field that's causing trouble. Instead of having four separate test files per macro, we now have one clean, organized version. They also deleted a bunch of duplicated tests in the moves directory. I love this kind of work because it makes the codebase more maintainable for everyone.

RalfJung contributed some really important infrastructure work around target specifications. They've tightened up the validation for LLVM ABI values and made sure they properly correlate with cfg target_abi. This might sound dry, but it's exactly the kind of foundational work that prevents weird bugs down the road when you're targeting different platforms.

The query system got some love too. Zalathar cleaned up the query_feed function - removing redundant parameters and making the naming more consistent. Zoxc replaced the visit_waiters approach with abstracted_waiters_of, which makes the control flow much clearer. These might seem like small changes, but when you're working with the query system every day, clarity is everything.

I'm particularly excited about the LinkedGraph improvements from petrochenkov. Now you can add nodes and edges in any order, which is surprisingly useful when you're building complex dependency graphs. If you reference a node that doesn't exist yet, the system just leaves a placeholder and fills it in later. Elegant solution to a tricky problem.

And speaking of elegant solutions, Zalathar made ChunkedBitSet cleaner by using named fields instead of positional ones in the Chunk::Mixed variant. Now when you see a field with type ChunkSize, you immediately know it's counting ones, not representing a length or size. These little clarity improvements add up.

Today's focus should be on testing and validation. With all these changes, especially the const closures reimplementation, this is a perfect time to dust off any const code you've been working on and give it a spin with the latest changes. The team mentioned they need more comprehensive tests for the new const closure implementation, so if you've got interesting const use cases, now's a great time to try them out and report any issues you find.

Also, if you're working on cross-platform code, take a moment to appreciate those target specification improvements. The stricter validation might catch issues you didn't even know you had.

That's a wrap on today's episode! Sixteen merged PRs, tons of cleanup, and some genuinely exciting feature work. The Rust project continues to evolve thoughtfully, balancing new capabilities with code quality and maintainability. Keep building amazing things, and we'll catch you next time with more updates from the wonderful world of Rust development!