Remove an unnecessary lifetime
This commit is contained in:
parent
a54bfcf52b
commit
d4379d2afd
6 changed files with 11 additions and 11 deletions
|
@ -133,7 +133,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
|
|||
Self::alloca(bx, ptr_layout)
|
||||
}
|
||||
|
||||
pub fn len<Cx: ConstCodegenMethods<'tcx, Value = V>>(&self, cx: &Cx) -> V {
|
||||
pub fn len<Cx: ConstCodegenMethods<Value = V>>(&self, cx: &Cx) -> V {
|
||||
if let FieldsShape::Array { count, .. } = self.layout.fields {
|
||||
if self.layout.is_unsized() {
|
||||
assert_eq!(count, 0);
|
||||
|
|
|
@ -3,7 +3,7 @@ use rustc_middle::mir::interpret::{ConstAllocation, Scalar};
|
|||
|
||||
use super::BackendTypes;
|
||||
|
||||
pub trait ConstCodegenMethods<'tcx>: BackendTypes {
|
||||
pub trait ConstCodegenMethods: BackendTypes {
|
||||
// Constant constructors
|
||||
fn const_null(&self, t: Self::Type) -> Self::Value;
|
||||
/// Generate an uninitialized value (matching uninitialized memory in MIR).
|
||||
|
@ -38,7 +38,7 @@ pub trait ConstCodegenMethods<'tcx>: BackendTypes {
|
|||
fn const_to_opt_uint(&self, v: Self::Value) -> Option<u64>;
|
||||
fn const_to_opt_u128(&self, v: Self::Value, sign_ext: bool) -> Option<u128>;
|
||||
|
||||
fn const_data_from_alloc(&self, alloc: ConstAllocation<'tcx>) -> Self::Value;
|
||||
fn const_data_from_alloc(&self, alloc: ConstAllocation<'_>) -> Self::Value;
|
||||
|
||||
fn scalar_to_backend(&self, cv: Scalar, layout: abi::Scalar, llty: Self::Type) -> Self::Value;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ pub trait CodegenObject = Copy + PartialEq + fmt::Debug;
|
|||
pub trait CodegenMethods<'tcx> = LayoutOf<'tcx, LayoutOfResult = TyAndLayout<'tcx>>
|
||||
+ FnAbiOf<'tcx, FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>>
|
||||
+ TypeCodegenMethods<'tcx>
|
||||
+ ConstCodegenMethods<'tcx>
|
||||
+ ConstCodegenMethods
|
||||
+ StaticCodegenMethods
|
||||
+ DebugInfoCodegenMethods<'tcx>
|
||||
+ AsmCodegenMethods<'tcx>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue