Produce a compile error in iced_renderer when no backend is enabled

This commit is contained in:
Héctor Ramón Jiménez 2024-05-22 12:36:04 +02:00
parent d92e0f7bba
commit 468794d918
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -48,6 +48,13 @@ mod renderer {
#[cfg(not(any(feature = "wgpu", feature = "tiny-skia")))]
mod renderer {
#[cfg(not(debug_assertions))]
compile_error!(
"Cannot compile `iced_renderer` in release mode \
without a renderer feature enabled. \
Enable either the `wgpu` or `tiny-skia` feature, or both."
);
pub type Renderer = ();
pub type Compositor = ();
}