NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #1105 most downloaded on crates.io
Test harness for ui tests of compiler diagnostics
Latest stable
1.0.125
Last release 4 days ago
16 Nov 2026
Release timing varies
gaps range from 1 weeks to 4 months
Nearly every release is documented
notes for 55 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
8 years old
126 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Support cargo 1.64's "workspace inheritance" mechanism (#190, #191)
Add categories and keywords to crates.io metadata
Allow later globs to override pass/fail status of earlier globs
Allow later globs to override pass/fail status of earlier globs (#174)
t.compile_fail("tests/ui/*.rs");
t.pass("tests/ui/ok.rs");
This will test tests/ui/ok.rs expecting it to pass, and all the rest of the contents of tests/ui expecting them to fail. Previous versions of trybuild would test tests/ui/ok.rs expecting it to fail and again expecting it to pass, which can't both be true.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Support directly running a trybuild integration test binary without going through cargo test
cargo test (#14)Turn warning on missing stderr file into error
Greatly reduce test execution time by compiling test cases in parallel on toolchains which support https://github.com/rust-lang/cargo/issues/10496. Ex
Greatly reduce test execution time by compiling test cases in parallel on toolchains which support https://github.com/rust-lang/cargo/issues/10496. Example from the serde crate's test suite, which becomes 16x faster on my machine:
$ time cargo test --test compiletest
real 0m21.442s
user 0m15.288s
sys 0m6.317s
$ time cargo test --test compiletest
real 0m1.290s
user 0m20.761s
sys 0m6.962s
Avoid warning inside generated code in projects which run their test suite with deny(unused_crate_dependencies) or deny(missing_docs) (#161, thanks @b
deny(unused_crate_dependencies) or deny(missing_docs) (#161, thanks @bearcage)Preparatory work to adopt Cargo's new --keep-going flag (https://github.com/rust-lang/cargo/pull/10383) which will make possible for trybuild to build
--keep-going flag (https://github.com/rust-lang/cargo/pull/10383) which will make possible for trybuild to build all the ui test inputs simultaneously instead of one at a time, greatly reducing execution time (#156)Improvements to reduce compile time
Better normalization of Windows filepaths in diagnostics
Use the same version of the Cargo resolver for the test build as used by the crate being tested
Drop dependency on lazy_static in favor of once_cell
lazy_static in favor of once_cellNormalize diagnostics inside of generated sources written to the Cargo-provided OUT_DIR
Display full path of test files (#139, thanks @taiki-e)
Strip line numbers from every file other than the one that was the argument to fn compile_fail
fn compile_fail (#136)Fix a case of normalization unexpectedly replacing a URL component as if it were a directory path
Improvements to normalization of project directory in compiler output (#130, #131, #132)
Eliminate inconsistency between windows and unix filepaths in diagnostics
Normalize extern crate filepaths after --> to account for upstream rustc diagnostics changes
--> to account for upstream rustc diagnostics changes (#128)Nothing published for this version
Expose a cfg that forces building as host architecture during a cross build (#123, thanks @taiki-e)
Make ui tests compatible with -Z instrument-coverage and other uses of RUSTFLAGS (#121, thanks @taiki-e)
-Z instrument-coverage and other uses of RUSTFLAGS (#121, thanks @taiki-e)Replace path to cargo registry with normalized path (#117, thanks @bkchr)
Prevent concurrent test runs from clashing on project directory (#58, #114)
Normalize paths of path dependencies outside of current crate's workspace (#107, #110, thanks @weiznich)
Fix compatibility with sccache by respecting test-time CARGO environment variable over build-time one (#111, thanks @rexhoffman)
CARGO environment variable over build-time one (#111, thanks @rexhoffman)Preserve any other patch fields from workspace .toml (#109, thanks @jlas)
patch fields from workspace .toml (#109, thanks @jlas)Attempt to build tests with the same versions of all dependencies as workspace lockfile
Restore compatibility with Rust 1.31
Perform case insensitive comparison for path replacements to normalize platform-dependent stderr on case insensitive filesystems
Propagate --target flag from cargo test invocation
Allow passing TestCases inside catch_unwind
Account for change in directory structure of standard library paths (#88, https://github.com/rust-lang/rust/pull/73265)
Omit line numbers from $WORKSPACE errors (#83, #85)
Normalize platform-dependent dir separators in type names of closures (#81, thanks @erickt)
Nothing published for this version
Show more helpful error when a cargo metadata invocation fails
cargo metadata invocation fails (#78)Normalize absolute paths that point into the host's rustup rust-src component
rust-src component (#74)Normalize away trailing whitespace before writing stderr files; trailing whitespace is problematic because some editors will throw it away on save
Normalize some instances of Windows path separators
Pass the same --features argument across all invocations of cargo build (#59, thanks @hannobraun)
--features argument across all invocations of cargo build (#59, thanks @hannobraun)Force lockfile generation to be more resilient to stale dependencies (#54, thanks @ascjones)
Support running tests in offline mode (#50, thanks @thomaseizinger)
Mention TRYBUILD=overwrite in the error message when a compile-fail test fails
Define --cfg trybuild when building the ui tests; this allows build scripts (via cfg!(trybuild)) and libraries (via #[cfg(trybuild)]) to omit parts th
--cfg trybuild when building the ui tests; this allows build scripts (via cfg!(trybuild)) and libraries (via #[cfg(trybuild)]) to omit parts that are unneeded for the ui testsFix feature flag detection on Windows (#44, thanks @abonander)
Add experimental support for highlighting the difference between expected and actual compiler output
<p align="center"><img src="https://user-images.githubusercontent.com/1940490/71450848-e365b700-2737-11ea-9656-116ef72c01b9.png" width="80%"></p>
Specify correct minimal versions of dependencies (#37, thanks @mathstuf)
Clarify warning message when no trybuild tests are enabled
Avoid creating conflicts in the tested crate's target directory on nightly-2019-10-03 and up
Normalize separators in $WORKSPACE paths (#32, thanks @dherman)
Normalize workspace-relative paths
Update filter for insignificant lines to take into account the message change in https://github.com/rust-lang/cargo/pull/7369
Nothing published for this version
Support filtering which test cases are run
Display the compile-time println output from macros (#22, thanks @DevinR528)
Additional normalization: "error: Could not compile \crate-name\" is accepted optionally
Match *cargo test*'s output more closely
Make git ignore the wip directory
Respect [patch] and [replace] sections in workspace root's Cargo.toml (#3, thanks @regexident)
[patch] and [replace] sections in workspace root's Cargo.toml (#3, thanks @regexident)One column per quarter.