From 693a6cddad750d0401942d553969310193ec2614 Mon Sep 17 00:00:00 2001 From: Maytham Alsudany <maytha8thedev@gmail.com> Date: Fri, 10 Jan 2025 18:43:36 +0800 Subject: [PATCH] Add feature gate to tests that use std --- tests/test_expr.rs | 1 + tests/test_path.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/test_expr.rs b/tests/test_expr.rs index 4252280..5678e84 100644 --- a/tests/test_expr.rs +++ b/tests/test_expr.rs @@ -90,6 +90,7 @@ fn test_rustup() { } // Regression test for https://github.com/dtolnay/thiserror/issues/335 +#[cfg(feature = "std")] #[test] #[allow(non_snake_case)] fn test_assoc_type_equality_constraint() { diff --git a/tests/test_path.rs b/tests/test_path.rs index 5bb6972..fa85c1d 100644 --- a/tests/test_path.rs +++ b/tests/test_path.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "std")] + use core::fmt::Display; use ref_cast::RefCast; use std::path::{Path, PathBuf};