// run-rustfix #![allow(dead_code)] // https://github.com/rust-lang/rust/issues/112007 fn bug_report(w: &mut W) -> std::fmt::Result { if true { writeln!(w, "`;?` here ->")?; } else { return writeln!(w, "but not here"); //~^ ERROR mismatched types }; Ok(()) } macro_rules! baz { ($w: expr) => { bar!($w) } } macro_rules! bar { ($w: expr) => { writeln!($w, "but not here") //~^ ERROR mismatched types } } fn foo(w: &mut W) -> std::fmt::Result { if true { writeln!(w, "`;?` here ->")?; } else { return baz!(w); }; Ok(()) } fn main() {}