about summary refs log tree commit diff
path: root/src/librustc_codegen_ssa/debuginfo.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-02 18:02:20 +0000
committerbors <bors@rust-lang.org>2018-12-02 18:02:20 +0000
commit21f26849506c141a6760532ca5bdfd8345247fdb (patch)
treea9a9bbcf59c5b72c1d90d5e1ae9d8003b659deb7 /src/librustc_codegen_ssa/debuginfo.rs
parent8660eba2b9bec5b0fe971b7281f79e79c2df2fae (diff)
parentd108a913c79660ab375aff33ea9caa2885ba3051 (diff)
downloadrust-21f26849506c141a6760532ca5bdfd8345247fdb.tar.gz
rust-21f26849506c141a6760532ca5bdfd8345247fdb.zip
Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
Refactor rustc_codegen_ssa

cc #56108 (not all things are done yet)

This removes an unsafe method from cg_ssa.

r? @eddyb
cc @sunfishcode
Diffstat (limited to 'src/librustc_codegen_ssa/debuginfo.rs')
-rw-r--r--src/librustc_codegen_ssa/debuginfo.rs21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/librustc_codegen_ssa/debuginfo.rs b/src/librustc_codegen_ssa/debuginfo.rs
index 0fc61422bb3..bcf6d7b6bf8 100644
--- a/src/librustc_codegen_ssa/debuginfo.rs
+++ b/src/librustc_codegen_ssa/debuginfo.rs
@@ -23,22 +23,21 @@ impl<D> FunctionDebugContext<D> {
         match *self {
             FunctionDebugContext::RegularContext(ref data) => data,
             FunctionDebugContext::DebugInfoDisabled => {
-                span_bug!(span, "{}", FunctionDebugContext::<D>::debuginfo_disabled_message());
+                span_bug!(
+                    span,
+                    "debuginfo: Error trying to access FunctionDebugContext \
+                     although debug info is disabled!",
+                );
             }
             FunctionDebugContext::FunctionWithoutDebugInfo => {
-                span_bug!(span, "{}", FunctionDebugContext::<D>::should_be_ignored_message());
+                span_bug!(
+                    span,
+                    "debuginfo: Error trying to access FunctionDebugContext \
+                     for function that should be ignored by debug info!",
+                );
             }
         }
     }
-
-    fn debuginfo_disabled_message() -> &'static str {
-        "debuginfo: Error trying to access FunctionDebugContext although debug info is disabled!"
-    }
-
-    fn should_be_ignored_message() -> &'static str {
-        "debuginfo: Error trying to access FunctionDebugContext for function that should be \
-         ignored by debug info!"
-    }
 }
 
 /// Enables emitting source locations for the given functions.