//@ edition:2021 type TranslateFn = Box String>; pub struct DeviceCluster { devices: Vec, } impl DeviceCluster { pub async fn do_something(&mut self) -> Result> { let mut last_error: Box; for device in &mut self.devices { match device.do_something().await { Ok(info) => { return Ok(info); } Err(e) => {} } } Err(last_error) //~^ ERROR used binding `last_error` isn't initialized } } pub struct Device { translate_fn: Option, } impl Device { pub async fn do_something(&mut self) -> Result> { Ok(String::from("")) } } fn main() {}