pub fn format<W>( w: &mut W, path: &str, diagnostics_hierarchy: DiagnosticsHierarchy, ) -> Resultwhere W: Write,