#!/bin/bash
set -e
WARN_FLAGS="-D warnings"
if [[ " $* " =~ " --relaxed " ]]; then
    WARN_FLAGS=""
fi
# The `exfiltrate` feature adds the task registry and its providers; without
# a second pass none of that is built by the gate at all.
RUSTFLAGS="$WARN_FLAGS" cargo check --all --all-targets
RUSTFLAGS="$WARN_FLAGS" cargo check --all --all-targets --features exfiltrate
