about summary refs log tree commit diff
path: root/compiler/rustc_error_messages
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-10-11 18:59:50 +0200
committerGitHub <noreply@github.com>2022-10-11 18:59:50 +0200
commita13c7da23e65d0c6d2b5c9402cd7db76d50e6131 (patch)
tree41ab04a4f0013bcdef1543dd6cc341a30b1796ae /compiler/rustc_error_messages
parentcb6728339298a83cf18df7f941a57628be4cf6e8 (diff)
parent68260289b5afa6728c32378c581e67c714ea4263 (diff)
downloadrust-a13c7da23e65d0c6d2b5c9402cd7db76d50e6131.tar.gz
rust-a13c7da23e65d0c6d2b5c9402cd7db76d50e6131.zip
Rollup merge of #102893 - TaKO8Ki:fix-102878, r=davidtwco
Fix ICE #102878

Fixes #102878
Diffstat (limited to 'compiler/rustc_error_messages')
-rw-r--r--compiler/rustc_error_messages/src/lib.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs
index 77f87d5b007..a2d507328b3 100644
--- a/compiler/rustc_error_messages/src/lib.rs
+++ b/compiler/rustc_error_messages/src/lib.rs
@@ -337,19 +337,6 @@ impl DiagnosticMessage {
             }
         }
     }
-
-    /// Returns the `String` contained within the `DiagnosticMessage::Str` variant, assuming that
-    /// this diagnostic message is of the legacy, non-translatable variety. Panics if this
-    /// assumption does not hold.
-    ///
-    /// Don't use this - it exists to support some places that do comparison with diagnostic
-    /// strings.
-    pub fn expect_str(&self) -> &str {
-        match self {
-            DiagnosticMessage::Str(s) => s,
-            _ => panic!("expected non-translatable diagnostic message"),
-        }
-    }
 }
 
 /// `From` impl that enables existing diagnostic calls to functions which now take