Check that at least one medium is enabled if socket is enabled.

This commit is contained in:
Dario Nieuwenhuis 2021-06-17 03:22:02 +02:00
parent 32311b23dc
commit 9965f09e02
1 changed files with 9 additions and 0 deletions

View File

@ -105,6 +105,15 @@ compile_error!("You must enable at least one of the following features: proto-ip
))]
compile_error!("If you enable the socket feature, you must enable at least one of the following features: socket-raw, socket-udp, socket-tcp, socket-icmp");
#[cfg(all(
feature = "socket",
not(any(
feature = "medium-ethernet",
feature = "medium-ip",
))
))]
compile_error!("If you enable the socket feature, you must enable at least one of the following features: medium-ip, medium-ethernet");
#[cfg(all(feature = "defmt", feature = "log"))]
compile_error!("You must enable at most one of the following features: defmt, log");