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 | |
| parent | 0c1dc62c1ec3c23dcb5e90500a2b3b25817ad03a (diff) | |
| download | rust-b3b6e4dd9bdfb4aca1835e156fe9a08a8a65f097.tar.gz rust-b3b6e4dd9bdfb4aca1835e156fe9a08a8a65f097.zip | |
Some refactorings
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/debuginfo.rs | 21 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/traits/backend.rs | 1 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/traits/mod.rs | 1 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/traits/type_.rs | 2 |
4 files changed, 10 insertions, 15 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. diff --git a/src/librustc_codegen_ssa/traits/backend.rs b/src/librustc_codegen_ssa/traits/backend.rs index b4d376cf5f0..9489cb164f4 100644 --- a/src/librustc_codegen_ssa/traits/backend.rs +++ b/src/librustc_codegen_ssa/traits/backend.rs @@ -26,7 +26,6 @@ pub trait BackendTypes { type Value: CodegenObject; type BasicBlock: Copy; type Type: CodegenObject; - type Context; type Funclet; type DIScope: Copy; diff --git a/src/librustc_codegen_ssa/traits/mod.rs b/src/librustc_codegen_ssa/traits/mod.rs index 5cff31e17b5..1c334898ce6 100644 --- a/src/librustc_codegen_ssa/traits/mod.rs +++ b/src/librustc_codegen_ssa/traits/mod.rs @@ -92,7 +92,6 @@ pub trait HasCodegen<'tcx>: Backend<'tcx> { Value = Self::Value, BasicBlock = Self::BasicBlock, Type = Self::Type, - Context = Self::Context, Funclet = Self::Funclet, DIScope = Self::DIScope, >; diff --git a/src/librustc_codegen_ssa/traits/type_.rs b/src/librustc_codegen_ssa/traits/type_.rs index 15976ac516d..bc6b70ad02f 100644 --- a/src/librustc_codegen_ssa/traits/type_.rs +++ b/src/librustc_codegen_ssa/traits/type_.rs @@ -41,11 +41,9 @@ pub trait BaseTypeMethods<'tcx>: Backend<'tcx> { fn type_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type; fn type_variadic_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type; fn type_struct(&self, els: &[Self::Type], packed: bool) -> Self::Type; - fn type_named_struct(&self, name: &str) -> Self::Type; fn type_array(&self, ty: Self::Type, len: u64) -> Self::Type; fn type_vector(&self, ty: Self::Type, len: u64) -> Self::Type; fn type_kind(&self, ty: Self::Type) -> TypeKind; - fn set_struct_body(&self, ty: Self::Type, els: &[Self::Type], packed: bool); fn type_ptr_to(&self, ty: Self::Type) -> Self::Type; fn element_type(&self, ty: Self::Type) -> Self::Type; |
