Skip to content

Commit 6dfd5be

Browse files
committed
By default, set RUSTFLAGS="-A warnings" since transpiled code usually has a ton of warnings.
This can be easily reversed by a subsequent `--rustflags="-D warnings"`.
1 parent 2ce9edd commit 6dfd5be

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dynamic_instrumentation/src/main.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,14 @@ fn cargo_wrapper(rustc_wrapper: &Path) -> anyhow::Result<()> {
525525
Cow::Borrowed(metadata_path)
526526
};
527527

528-
let rustflags = [env::var_os("RUSTFLAGS"), rustflags]
529-
.into_iter()
530-
.flatten()
531-
.join(OsStr::new(" "));
528+
let rustflags = [
529+
env::var_os("RUSTFLAGS"),
530+
Some("-A warnings".into()),
531+
rustflags,
532+
]
533+
.into_iter()
534+
.flatten()
535+
.join(OsStr::new(" "));
532536

533537
// Enable the runtime dependency.
534538
add_feature(&mut cargo_args, &["c2rust-analysis-rt"]);

0 commit comments

Comments
 (0)