about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/diagnostic.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-23 15:43:34 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-28 08:55:37 +1100
commite3c19a2928c55ebeaa0f229fa86ea74e93b06d46 (patch)
tree1411ffd6db4537c274d5902c167fc719ad659a21 /compiler/rustc_errors/src/diagnostic.rs
parentd0ef108ce991db652ac19f652af70d194920aa26 (diff)
downloadrust-e3c19a2928c55ebeaa0f229fa86ea74e93b06d46.tar.gz
rust-e3c19a2928c55ebeaa0f229fa86ea74e93b06d46.zip
Rename `DiagnosticLocation` as `DiagLocation`.
Diffstat (limited to 'compiler/rustc_errors/src/diagnostic.rs')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index 7ec8b36b795..da621b2230e 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -184,21 +184,21 @@ pub trait DecorateLint<'a, G: EmissionGuarantee> {
 }
 
 #[derive(Clone, Debug, Encodable, Decodable)]
-pub struct DiagnosticLocation {
+pub struct DiagLocation {
     file: Cow<'static, str>,
     line: u32,
     col: u32,
 }
 
-impl DiagnosticLocation {
+impl DiagLocation {
     #[track_caller]
     fn caller() -> Self {
         let loc = panic::Location::caller();
-        DiagnosticLocation { file: loc.file().into(), line: loc.line(), col: loc.column() }
+        DiagLocation { file: loc.file().into(), line: loc.line(), col: loc.column() }
     }
 }
 
-impl fmt::Display for DiagnosticLocation {
+impl fmt::Display for DiagLocation {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         write!(f, "{}:{}:{}", self.file, self.line, self.col)
     }
@@ -288,7 +288,7 @@ pub struct DiagInner {
 
     /// With `-Ztrack_diagnostics` enabled,
     /// we print where in rustc this error was emitted.
-    pub(crate) emitted_at: DiagnosticLocation,
+    pub(crate) emitted_at: DiagLocation,
 }
 
 impl DiagInner {
@@ -309,7 +309,7 @@ impl DiagInner {
             args: Default::default(),
             sort_span: DUMMY_SP,
             is_lint: None,
-            emitted_at: DiagnosticLocation::caller(),
+            emitted_at: DiagLocation::caller(),
         }
     }