diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2018-11-23 18:24:30 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2018-11-29 18:19:41 +0100 |
| commit | b3b6e4dd9bdfb4aca1835e156fe9a08a8a65f097 (patch) | |
| tree | da0c5ef7ef4b8de1393d0c121e403a916f9781bd /src/librustc_codegen_ssa/debuginfo.rs | |
| parent | 0c1dc62c1ec3c23dcb5e90500a2b3b25817ad03a (diff) | |
| download | rust-b3b6e4dd9bdfb4aca1835e156fe9a08a8a65f097.tar.gz rust-b3b6e4dd9bdfb4aca1835e156fe9a08a8a65f097.zip | |
Some refactorings
Diffstat (limited to 'src/librustc_codegen_ssa/debuginfo.rs')
| -rw-r--r-- | src/librustc_codegen_ssa/debuginfo.rs | 21 |
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. |
