diff --git a/egui/src/containers/area.rs b/egui/src/containers/area.rs index 194e75d2..9c10cc01 100644 --- a/egui/src/containers/area.rs +++ b/egui/src/containers/area.rs @@ -40,6 +40,7 @@ impl State { /// .show(ctx, |ui| { /// ui.label("Floating text!"); /// }); +#[must_use = "You should call .show()"] #[derive(Clone, Copy, Debug)] pub struct Area { pub(crate) id: Id, diff --git a/egui/src/containers/collapsing_header.rs b/egui/src/containers/collapsing_header.rs index 53657b27..0af5b04d 100644 --- a/egui/src/containers/collapsing_header.rs +++ b/egui/src/containers/collapsing_header.rs @@ -134,6 +134,7 @@ pub(crate) fn paint_icon(ui: &mut Ui, openness: f32, response: &Response) { /// // Short version: /// ui.collapsing("Heading", |ui| { ui.label("Contents"); }); /// ``` +#[must_use = "You should call .show()"] pub struct CollapsingHeader { label: Label, default_open: bool, diff --git a/egui/src/containers/combo_box.rs b/egui/src/containers/combo_box.rs index 8f19ffcf..acc00c40 100644 --- a/egui/src/containers/combo_box.rs +++ b/egui/src/containers/combo_box.rs @@ -19,6 +19,7 @@ use epaint::Shape; /// } /// ); /// ``` +#[must_use = "You should call .show*"] pub struct ComboBox { id_source: Id, label: Option