dtolnay / dtolnay/trybuild

Allow to pass or propagate some RUSTFLAGS

Open
#283 4 comments 7 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
998
Forks
84
PR merge metrics
No merged PRs in 30d

Description

Due to:
https://github.com/dtolnay/trybuild/pull/278/files#diff-36dcce9bb960d87a9efde38a0309b8e3e552a4193594bb2065ced1e749c9b743R41
the latests version doesn't propagate the RUSTFLAGS anymore.

In our usecase we pass `deny warnings` using the RUSTFLAGS environment variable.

This is very handy to ensure no warnings ever gets emitted from our macros.

```rust
#[test]
fn tests() {
std::env::set_var("RUSTFLAGS", "--deny warnings");
let t = trybuild::TestCases::new();
t.compile_fail("tests/*rs");
}
```

Is there a way to allow giving rustflags maybe with a new TRYBUILD_RUSTFLAGS or something?

~If you approve the direction I can make a PR~ I struggled a bit, then not much time now

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.