pub(crate) fn write_file<T>( psess: Option<&ParseSess>, filename: &FileName, formatted_text: &str, out: &mut T, emitter: &mut dyn Emitter, newline_style: NewlineStyle, ) -> Result<EmitterResult, Error>where T: Write,