Skip to content

Commit 81819a8

Browse files
committed
windows: be more explicit about unsupported features
the rawfd and xen features do not work on windows (and don't even compile), so explicitly give a compile_error!() in this case. Signed-off-by: Patrick Roy <[email protected]>
1 parent c23a63b commit 81819a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
#[cfg(not(target_pointer_width = "64"))]
2525
compile_error!("vm-memory only supports 64-bit targets!");
2626

27+
#[cfg(all(target_family = "windows", feature = "rawfd"))]
28+
compile_error!("rawfd feature is not supported on Windows targets!");
29+
30+
#[cfg(all(target_family = "windows", feature = "xen"))]
31+
compile_error!("xen feature is not supported on Windows targets!");
32+
2733
#[macro_use]
2834
pub mod address;
2935
pub use address::{Address, AddressValue};

0 commit comments

Comments
 (0)