Skip to content

Commit

Permalink
Merge #54
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bors[bot] and taiki-e authored Aug 15, 2021
2 parents 3bda53a + ca93cb9 commit 9a7120d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ fn run_test(cx: &Context) -> Result<()> {
" -Z instrument-coverage --remap-path-prefix {}/=",
cx.metadata.workspace_root
));
if cx.target.is_none() {
rustflags.push(" --cfg trybuild_no_target");
}

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

0 comments on commit 9a7120d

Please sign in to comment.