about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/emitter.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-21 10:30:17 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-23 13:23:28 +1100
commitce0f703554f3828f2d470679cd1e83b52667bf20 (patch)
tree9ce49517d306d21e398069ca7a47bf46482bd479 /compiler/rustc_errors/src/emitter.rs
parent125337bd6810f25857183ac12f1517e0de7b3bf6 (diff)
downloadrust-ce0f703554f3828f2d470679cd1e83b52667bf20.tar.gz
rust-ce0f703554f3828f2d470679cd1e83b52667bf20.zip
Remove `SubDiagnostic::render_span`.
It's only ever set to `None`.
Diffstat (limited to 'compiler/rustc_errors/src/emitter.rs')
-rw-r--r--compiler/rustc_errors/src/emitter.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs
index 78050889da3..546159c9d13 100644
--- a/compiler/rustc_errors/src/emitter.rs
+++ b/compiler/rustc_errors/src/emitter.rs
@@ -352,7 +352,6 @@ pub trait Emitter: Translate {
                     level: Level::Note,
                     messages: vec![(DiagnosticMessage::from(msg), Style::NoStyle)],
                     span: MultiSpan::new(),
-                    render_span: None,
                 });
             }
         }
@@ -2118,7 +2117,7 @@ impl EmitterWriter {
                 }
                 if !self.short_message {
                     for child in children {
-                        let span = child.render_span.as_ref().unwrap_or(&child.span);
+                        let span = &child.span;
                         if let Err(err) = self.emit_messages_default_inner(
                             span,
                             &child.messages,