Rust

Rust: Spring Cleaning and Feature Detection

Today's Rust compiler got a major spring cleaning with 20 merged pull requests! The highlight is a long-awaited feature to lint unused features, plus significant refactoring work that removes deprecated code and improves error handling. We also saw improvements to async drop functionality and const context support for path separators.

Duration: PT4M14S

https://podlog.io/listen/rust-ffe93d3a/episode/rust-spring-cleaning-and-feature-detection-90290ffb

Transcript

Hey there, Rustaceans! Welcome back to another episode of the Rust podcast. I'm your host, and wow, do we have a packed episode for you today - March 5th, 2026. Grab your favorite beverage because we're diving into 20 merged pull requests that just landed in the Rust compiler. It's like the entire team decided to do spring cleaning all at once!

Let me start with the absolute star of today's show - PR #152164 from mu001999. This one's been brewing for almost two years, addressing issue #44232 from way back. It introduces linting for unused features! You know how sometimes you enable a feature gate but then remove the code that actually uses it? Well, now the compiler will gently tap you on the shoulder and say "Hey, you're not using this anymore." The implementation is clever too - it tracks feature usage through query side effects and then reports the unused ones at the end. With 386 lines added and touching 111 files, this was no small feat.

Speaking of big changes, we had not one, not two, but three rollup PRs today! JonathanBrouwer and matthiaskrgr were busy collecting smaller changes into neat packages. The biggest rollup included 12 separate pull requests spanning over 300 files. That's what I call efficient collaboration!

Now, let's talk about some cleanup that'll make your error messages better. Nicholas Nethercote landed PR #153317 that improves how the compiler handles representability errors - those tricky situations where types reference themselves in impossible ways. By aborting after these errors instead of continuing, we get cleaner, more focused error messages. Sometimes the best fix is knowing when to stop!

For those of you working with async drop - and I know some of you brave souls are exploring that frontier - ValorZard fixed a nasty multi-crate crash in PR #153274. This addresses issue #142572 and includes some thoughtful refactoring of the elaborate_drop.rs code. It's exactly the kind of fix that makes experimental features more reliable for everyone.

Here's something that might seem small but is actually pretty exciting for const contexts - MikkelPaulson updated path separators to be available at compile time in PR #153196. This consolidates platform-specific path handling behind a common macro, reducing the chance of those sneaky transcription errors that can happen when the same logic is written multiple times.

GuillaumeGomez deserves a special shoutout for PR #153401, which represents the final removal of the LintDiagnostic trait and proc-macro. This is part 7 of an ongoing migration effort, and seeing that \o/ celebration in the description tells you everything about how good it feels to finally close out a long refactoring project.

For our const evaluation friends, there's an important fix from eggyal in PR #151842 that prevents parameter attribute deduction during compile-time function evaluation. This solves some thorny issues where looking at function bodies during CTFE could cause problems. It's the kind of deep compiler work that most of us never see but makes everything more robust.

Today's focus is really about stability and polish. If you're contributing to Rust, take inspiration from these PRs. Notice how many of them are cleanup work - removing deprecated code, improving error messages, consolidating similar logic. This isn't glamorous work, but it's what makes a language great to use. Whether you're fixing a two-year-old issue like the unused features lint, or doing careful refactoring like the LintDiagnostic removal, every improvement counts.

If you're looking to contribute, keep an eye out for opportunities to consolidate duplicate code, improve error messages, or fix those papercut issues that affect daily development. The Rust community values this kind of thoughtful maintenance work just as much as flashy new features.

That's a wrap for today! Twenty pull requests, countless hours of careful work, and a compiler that's a little bit better for everyone. Until next time, keep your borrows checked and your lifetimes clear. Happy coding!