diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 225514ea863cb..5a8aa66c61119 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -103,7 +103,7 @@ pub struct TypeLowering<'ll> { /// If padding is used the slice maps fields from source order /// to llvm order. - pub field_remapping: Option>>, + pub field_remapping: Option>, } fn to_llvm_tls_model(tls_model: TlsModel) -> llvm::ThreadLocalMode { diff --git a/compiler/rustc_codegen_llvm/src/type_of.rs b/compiler/rustc_codegen_llvm/src/type_of.rs index 180da1a6046e6..85efe3e64836c 100644 --- a/compiler/rustc_codegen_llvm/src/type_of.rs +++ b/compiler/rustc_codegen_llvm/src/type_of.rs @@ -19,7 +19,7 @@ fn uncached_llvm_type<'a, 'tcx>( cx: &CodegenCx<'a, 'tcx>, layout: TyAndLayout<'tcx>, defer: &mut Option<(&'a Type, TyAndLayout<'tcx>)>, - field_remapping: &mut Option>>, + field_remapping: &mut Option>, ) -> &'a Type { match layout.abi { Abi::Scalar(_) => bug!("handled elsewhere"), @@ -94,7 +94,7 @@ fn uncached_llvm_type<'a, 'tcx>( fn struct_llfields<'a, 'tcx>( cx: &CodegenCx<'a, 'tcx>, layout: TyAndLayout<'tcx>, -) -> (Vec<&'a Type>, bool, Option>>) { +) -> (Vec<&'a Type>, bool, Option>) { debug!("struct_llfields: {:#?}", layout); let field_count = layout.fields.count(); @@ -150,7 +150,7 @@ fn struct_llfields<'a, 'tcx>( } else { debug!("struct_llfields: offset: {:?} stride: {:?}", offset, layout.size); } - let field_remapping = if padding_used { Some(Box::new(field_remapping)) } else { None }; + let field_remapping = if padding_used { Some(field_remapping) } else { None }; (result, packed, field_remapping) }