Skip to content

Commit d372741

Browse files
committed
Merge HumanEmitter::{new,create}.
They have the same signature, and the former just calls the latter.
1 parent 880c1c5 commit d372741

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

compiler/rustc_errors/src/emitter.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,10 @@ pub(crate) struct FileWithAnnotatedLines {
665665

666666
impl HumanEmitter {
667667
pub fn stderr(color_config: ColorConfig, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
668-
let dst = from_stderr(color_config);
669-
Self::create(dst, fallback_bundle)
668+
Self::new(from_stderr(color_config), fallback_bundle)
670669
}
671670

672-
fn create(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
671+
pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
673672
HumanEmitter {
674673
dst: IntoDynSyncSend(dst),
675674
sm: None,
@@ -686,10 +685,6 @@ impl HumanEmitter {
686685
}
687686
}
688687

689-
pub fn new(dst: Destination, fallback_bundle: LazyFallbackBundle) -> HumanEmitter {
690-
Self::create(dst, fallback_bundle)
691-
}
692-
693688
fn maybe_anonymized(&self, line_num: usize) -> Cow<'static, str> {
694689
if self.ui_testing {
695690
Cow::Borrowed(ANONYMIZED_LINE_NUM)

0 commit comments

Comments
 (0)