Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How to update trybuild .stderr files for rtf-derive

Rust may change compiler error message formatting between versions. When this causes trybuild fail tests to break in the rtf-derive crate, update the .stderr files to match the new output.

Prerequisites

  • The current Rust toolchain installed via rustup

Delete the .stderr files for the failing tests:

rm crates/rtf-derive/tests/compile/fail/*.stderr

Run cargo test. trybuild writes new .stderr files to a wip/ directory at the repository root:

cargo test -p rtf-derive

Copy the generated files into tests/compile/fail/:

cp wip/*.stderr crates/rtf-derive/tests/compile/fail/

Confirm the tests pass:

cargo test -p rtf-derive