Radar · Rust · Archive · Week 15 · Apr 7 – 13, 2025
This Month in Our Test Infra: March 2025 issue
Nice to knowtooling
- What changed
- The Rust team reported on the status of the test infrastructure for March 2025.
- Production impact
- The source does not say.
- Try it
- Run
cargo test --verboseto see your own test output. - Source
- blog.rust-lang.org/inside-rust/2025/04/13/test-infra-mar-2025/
Understand it, then run it
The Rust test system, called compiletest, now lets you match compiler diagnostics that appear after a line of code. Previously you could only match diagnostics that happened on the same line or earlier. This is useful when a test file contains code that is not valid Rust, so you cannot put a comment after the line to match the error. compiletest also added a new way to match diagnostics that don’t have a line number. Instead of using the older //@ error-pattern, you can write //~? ERROR message at the end of the file. This tells the test runner to look for an error with that exact message, even if the compiler didn’t attach a line number to it. If you run tests that use the old //@ error-pattern, the new system will now require you to add a //~ annotation anyway, so you don’t accidentally ignore errors. Finally, the bootstrap tool that builds Rust now uses a file called bootstrap.toml instead of config.toml. This avoids confusion with Cargo’s own configuration file.
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed