Skip to content

Commit 95064a0

Browse files
committed
test-support: Add [DIRTY-MSVC] to compare.rs docs
1 parent 00b81c2 commit 95064a0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/cargo-test-support/src/compare.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
//! `[WARNING]`) to match cargo's "status" output and allows you to ignore
1717
//! the alignment. See the source of `substitute_macros` for a complete list
1818
//! of substitutions.
19+
//! - `[DIRTY-MSVC]` (only when the line starts with it) would be replaced by
20+
//! `[DIRTY]` when `cfg(target_env = "msvc")` or the line will be ignored otherwise.
21+
//! Tests that work around [issue 7358](https://github.com/rust-lang/cargo/issues/7358)
22+
//! can use this to avoid duplicating the `with_stderr` call like:
23+
//! `if cfg!(target_env = "msvc") {e.with_stderr("...[DIRTY]...");} else {e.with_stderr("...");}`.
1924
//!
2025
//! # Normalization
2126
//!

0 commit comments

Comments
 (0)