Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit b9f81ee

Browse files
committed
Deny warnings in CI
The main crate already has `#![deny(warnings)]`. Set RUSTFLAGS in CI to enforce this for other crates in the workspace.
1 parent a1e8a5b commit b9f81ee

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CI
22
on: [push, pull_request]
33

4+
env:
5+
RUSTDOCFLAGS: -Dwarnings
6+
RUSTFLAGS: -Dwarnings
7+
48
jobs:
59
docker:
610
name: Docker

build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ fn main() {
66
#[cfg(feature = "musl-reference-tests")]
77
musl_reference_tests::generate();
88

9+
println!("cargo::rustc-check-cfg=cfg(assert_no_panic)");
910
if !cfg!(feature = "checked") {
1011
let lvl = env::var("OPT_LEVEL").unwrap();
1112
if lvl != "0" {

ci/run-docker.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ run() {
1616
docker run \
1717
--rm \
1818
--user $(id -u):$(id -g) \
19+
-e "RUSTFLAGS=${RUSTFLAGS:-}" \
1920
-e CARGO_HOME=/cargo \
2021
-e CARGO_TARGET_DIR=/target \
2122
-v "${HOME}/.cargo":/cargo \

0 commit comments

Comments
 (0)