diff --git a/xtask/src/ci.rs b/xtask/src/ci.rs index 6bb8e888d90..56ac0f9a679 100644 --- a/xtask/src/ci.rs +++ b/xtask/src/ci.rs @@ -179,7 +179,10 @@ fn check_typos() -> Result<()> { fn check_clippy() -> Result<()> { cmd!("rustup run {NIGHTLY} cargo clippy --all-targets --features testing -- -D warnings") + // Work around https://github.com/rust-lang/cargo/issues/10744 + .env("CARGO_TARGET_APPLIES_TO_HOST", "true") .run()?; + cmd!( "rustup run {NIGHTLY} cargo clippy --workspace --all-targets --exclude matrix-sdk-crypto --exclude xtask @@ -187,12 +190,16 @@ fn check_clippy() -> Result<()> { --features native-tls,experimental-sliding-sync,sso-login,testing -- -D warnings" ) + .env("CARGO_TARGET_APPLIES_TO_HOST", "true") .run()?; + cmd!( "rustup run {NIGHTLY} cargo clippy --all-targets -p matrix-sdk-crypto --no-default-features -- -D warnings" ) + .env("CARGO_TARGET_APPLIES_TO_HOST", "true") .run()?; + Ok(()) }