Skip to content

Commit 9a7120d

Browse files
bors[bot]taiki-e
andauthored
Merge #54
54: Support trybuild (take 2) r=taiki-e a=taiki-e Fixes #32 The following patch is needed until dtolnay/trybuild#123 is merged: ```toml [patch.crates-io] trybuild = { git = "https://github.com/taiki-e/trybuild.git", branch = "target" } ``` --- Tested in the same way as #44 (comment) Co-authored-by: Taiki Endo <te316e89@gmail.com>
2 parents 3bda53a + ca93cb9 commit 9a7120d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ fn run_test(cx: &Context) -> Result<()> {
105105
" -Z instrument-coverage --remap-path-prefix {}/=",
106106
cx.metadata.workspace_root
107107
));
108+
if cx.target.is_none() {
109+
rustflags.push(" --cfg trybuild_no_target");
110+
}
108111

109112
// https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/instrument-coverage.html#including-doc-tests
110113
let rustdocflags = &mut cx.env.rustdocflags.clone();

0 commit comments

Comments
 (0)