From d3134f68f66870b492537e10dfe5fd6d3e1e372f Mon Sep 17 00:00:00 2001 From: Andrea Ciliberti Date: Sat, 8 Apr 2023 20:20:01 +0200 Subject: [PATCH] Compilation error only if feature is set --- ctru-rs/src/services/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ctru-rs/src/services/mod.rs b/ctru-rs/src/services/mod.rs index c466f04..2c51d10 100644 --- a/ctru-rs/src/services/mod.rs +++ b/ctru-rs/src/services/mod.rs @@ -34,7 +34,9 @@ cfg_if::cfg_if! { //! [package.metadata.cargo-3ds] //! romfs_dir = "romfs" //! ``` - + + // If the feature is set, but no "romfs" directory was found: send an error during compilation. + #[cfg(feature = "romfs")] compile_error!("romfs feature is enabled but no romfs found!"); } }