Issue a friendlier error message if fde-registry is enabled with no lock impl.

This commit is contained in:
Dan Gohman 2021-10-03 10:24:20 -07:00
parent 67ebac869f
commit 04a14677e4

View File

@ -67,6 +67,8 @@ unsafe fn lock_global_state() -> impl ops::DerefMut<Target = GlobalState> {
}); });
MUTEX.lock() MUTEX.lock()
} }
#[cfg(not(any(feature = "libc", feature = "spin")))]
compile_error!("Either feature \"libc\" or \"spin\" must be enabled to use \"fde-registry\".");
} }
pub fn get_finder() -> &'static Registry { pub fn get_finder() -> &'static Registry {