Skip to content

Commit f79a912

Browse files
committed
Auto merge of #130519 - matthiaskrgr:rollup-l1hok4x, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #130457 (Cleanup codegen traits) - #130471 (Add zlib to musl dist image so rust-lld will support zlib compression for debug info there.) - #130507 (Improve handling of raw-idents in check-cfg) - #130509 (llvm-wrapper: adapt for LLVM API changes, second try) - #130510 (doc: the source of `LetStmt` can also be `AssignDesugar`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7fc70f8 + c0951bb commit f79a912

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+294
-231
lines changed

compiler/rustc_codegen_cranelift/src/common.rs

-8
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,13 @@ pub(crate) struct FunctionCx<'m, 'clif, 'tcx: 'm> {
309309
}
310310

311311
impl<'tcx> LayoutOfHelpers<'tcx> for FunctionCx<'_, '_, 'tcx> {
312-
type LayoutOfResult = TyAndLayout<'tcx>;
313-
314312
#[inline]
315313
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
316314
RevealAllLayoutCx(self.tcx).handle_layout_err(err, span, ty)
317315
}
318316
}
319317

320318
impl<'tcx> FnAbiOfHelpers<'tcx> for FunctionCx<'_, '_, 'tcx> {
321-
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>;
322-
323319
#[inline]
324320
fn handle_fn_abi_err(
325321
&self,
@@ -450,8 +446,6 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> {
450446
pub(crate) struct RevealAllLayoutCx<'tcx>(pub(crate) TyCtxt<'tcx>);
451447

452448
impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
453-
type LayoutOfResult = TyAndLayout<'tcx>;
454-
455449
#[inline]
456450
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
457451
if let LayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err {
@@ -466,8 +460,6 @@ impl<'tcx> LayoutOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
466460
}
467461

468462
impl<'tcx> FnAbiOfHelpers<'tcx> for RevealAllLayoutCx<'tcx> {
469-
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>;
470-
471463
#[inline]
472464
fn handle_fn_abi_err(
473465
&self,

compiler/rustc_codegen_gcc/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[cfg(feature = "master")]
22
use gccjit::FnAttribute;
33
use gccjit::{ToLValue, ToRValue, Type};
4-
use rustc_codegen_ssa::traits::{AbiBuilderMethods, BaseTypeMethods};
4+
use rustc_codegen_ssa::traits::{AbiBuilderMethods, BaseTypeCodegenMethods};
55
use rustc_data_structures::fx::FxHashSet;
66
use rustc_middle::bug;
77
use rustc_middle::ty::layout::LayoutOf;

compiler/rustc_codegen_gcc/src/asm.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
55
use rustc_codegen_ssa::mir::operand::OperandValue;
66
use rustc_codegen_ssa::mir::place::PlaceRef;
77
use rustc_codegen_ssa::traits::{
8-
AsmBuilderMethods, AsmMethods, BaseTypeMethods, BuilderMethods, GlobalAsmOperandRef,
9-
InlineAsmOperandRef,
8+
AsmBuilderMethods, AsmCodegenMethods, BaseTypeCodegenMethods, BuilderMethods,
9+
GlobalAsmOperandRef, InlineAsmOperandRef,
1010
};
1111
use rustc_middle::bug;
1212
use rustc_middle::ty::Instance;
@@ -770,7 +770,7 @@ fn dummy_output_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, reg: InlineAsmRegCl
770770
}
771771
}
772772

773-
impl<'gcc, 'tcx> AsmMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
773+
impl<'gcc, 'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
774774
fn codegen_global_asm(
775775
&self,
776776
template: &[InlineAsmTemplatePiece],

compiler/rustc_codegen_gcc/src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::time::Instant;
66
use gccjit::{CType, FunctionType, GlobalKind};
77
use rustc_codegen_ssa::base::maybe_create_entry_wrapper;
88
use rustc_codegen_ssa::mono_item::MonoItemExt;
9-
use rustc_codegen_ssa::traits::DebugInfoMethods;
9+
use rustc_codegen_ssa::traits::DebugInfoCodegenMethods;
1010
use rustc_codegen_ssa::{ModuleCodegen, ModuleKind};
1111
use rustc_middle::dep_graph;
1212
use rustc_middle::mir::mono::Linkage;

compiler/rustc_codegen_gcc/src/builder.rs

+4-11
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ use rustc_codegen_ssa::common::{
1414
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
1515
use rustc_codegen_ssa::mir::place::PlaceRef;
1616
use rustc_codegen_ssa::traits::{
17-
BackendTypes, BaseTypeMethods, BuilderMethods, ConstMethods, HasCodegen, LayoutTypeMethods,
18-
OverflowOp, StaticBuilderMethods,
17+
BackendTypes, BaseTypeCodegenMethods, BuilderMethods, ConstCodegenMethods,
18+
LayoutTypeCodegenMethods, OverflowOp, StaticBuilderMethods,
1919
};
2020
use rustc_codegen_ssa::MemFlags;
2121
use rustc_data_structures::fx::FxHashSet;
2222
use rustc_middle::bug;
2323
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
2424
use rustc_middle::ty::layout::{
2525
FnAbiError, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError, LayoutOfHelpers,
26-
TyAndLayout,
2726
};
2827
use rustc_middle::ty::{Instance, ParamEnv, Ty, TyCtxt};
2928
use rustc_span::def_id::DefId;
@@ -460,10 +459,6 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
460459
}
461460
}
462461

463-
impl<'gcc, 'tcx> HasCodegen<'tcx> for Builder<'_, 'gcc, 'tcx> {
464-
type CodegenCx = CodegenCx<'gcc, 'tcx>;
465-
}
466-
467462
impl<'tcx> HasTyCtxt<'tcx> for Builder<'_, '_, 'tcx> {
468463
fn tcx(&self) -> TyCtxt<'tcx> {
469464
self.cx.tcx()
@@ -477,17 +472,13 @@ impl HasDataLayout for Builder<'_, '_, '_> {
477472
}
478473

479474
impl<'tcx> LayoutOfHelpers<'tcx> for Builder<'_, '_, 'tcx> {
480-
type LayoutOfResult = TyAndLayout<'tcx>;
481-
482475
#[inline]
483476
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
484477
self.cx.handle_layout_err(err, span, ty)
485478
}
486479
}
487480

488481
impl<'tcx> FnAbiOfHelpers<'tcx> for Builder<'_, '_, 'tcx> {
489-
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>;
490-
491482
#[inline]
492483
fn handle_fn_abi_err(
493484
&self,
@@ -531,6 +522,8 @@ fn set_rvalue_location<'a, 'gcc, 'tcx>(
531522
}
532523

533524
impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
525+
type CodegenCx = CodegenCx<'gcc, 'tcx>;
526+
534527
fn build(cx: &'a CodegenCx<'gcc, 'tcx>, block: Block<'gcc>) -> Builder<'a, 'gcc, 'tcx> {
535528
Builder::with_cx(cx, block)
536529
}

compiler/rustc_codegen_gcc/src/common.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use gccjit::{LValue, RValue, ToRValue, Type};
2-
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, MiscMethods, StaticMethods};
2+
use rustc_codegen_ssa::traits::{
3+
BaseTypeCodegenMethods, ConstCodegenMethods, MiscCodegenMethods, StaticCodegenMethods,
4+
};
35
use rustc_middle::mir::interpret::{ConstAllocation, GlobalAlloc, Scalar};
46
use rustc_middle::mir::Mutability;
57
use rustc_middle::ty::layout::LayoutOf;
@@ -55,7 +57,7 @@ pub fn type_is_pointer(typ: Type<'_>) -> bool {
5557
typ.get_pointee().is_some()
5658
}
5759

58-
impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
60+
impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
5961
fn const_null(&self, typ: Type<'gcc>) -> RValue<'gcc> {
6062
if type_is_pointer(typ) { self.context.new_null(typ) } else { self.const_int(typ, 0) }
6163
}

compiler/rustc_codegen_gcc/src/consts.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#[cfg(feature = "master")]
22
use gccjit::{FnAttribute, VarAttribute, Visibility};
33
use gccjit::{Function, GlobalKind, LValue, RValue, ToRValue, Type};
4-
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, StaticMethods};
4+
use rustc_codegen_ssa::traits::{
5+
BaseTypeCodegenMethods, ConstCodegenMethods, StaticCodegenMethods,
6+
};
57
use rustc_hir::def::DefKind;
68
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
79
use rustc_middle::mir::interpret::{
@@ -37,7 +39,7 @@ fn set_global_alignment<'gcc, 'tcx>(
3739
gv.set_alignment(align.bytes() as i32);
3840
}
3941

40-
impl<'gcc, 'tcx> StaticMethods for CodegenCx<'gcc, 'tcx> {
42+
impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
4143
fn static_addr_of(&self, cv: RValue<'gcc>, align: Align, kind: Option<&str>) -> RValue<'gcc> {
4244
// TODO(antoyo): implement a proper rvalue comparison in libgccjit instead of doing the
4345
// following:

compiler/rustc_codegen_gcc/src/context.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ use gccjit::{
55
};
66
use rustc_codegen_ssa::base::wants_msvc_seh;
77
use rustc_codegen_ssa::errors as ssa_errors;
8-
use rustc_codegen_ssa::traits::{BackendTypes, BaseTypeMethods, MiscMethods};
8+
use rustc_codegen_ssa::traits::{BackendTypes, BaseTypeCodegenMethods, MiscCodegenMethods};
99
use rustc_data_structures::base_n::{ToBaseN, ALPHANUMERIC_ONLY};
1010
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1111
use rustc_middle::mir::mono::CodegenUnit;
1212
use rustc_middle::span_bug;
1313
use rustc_middle::ty::layout::{
1414
FnAbiError, FnAbiOf, FnAbiOfHelpers, FnAbiRequest, HasParamEnv, HasTyCtxt, LayoutError,
15-
LayoutOfHelpers, TyAndLayout,
15+
LayoutOfHelpers,
1616
};
1717
use rustc_middle::ty::{self, Instance, ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt};
1818
use rustc_session::Session;
1919
use rustc_span::source_map::respan;
2020
use rustc_span::{Span, DUMMY_SP};
21-
use rustc_target::abi::call::FnAbi;
2221
use rustc_target::abi::{HasDataLayout, PointeeInfo, Size, TargetDataLayout, VariantIdx};
2322
use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, Target, TlsModel, WasmCAbi};
2423

@@ -426,7 +425,7 @@ impl<'gcc, 'tcx> BackendTypes for CodegenCx<'gcc, 'tcx> {
426425
type DIVariable = (); // TODO(antoyo)
427426
}
428427

429-
impl<'gcc, 'tcx> MiscMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
428+
impl<'gcc, 'tcx> MiscCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
430429
fn vtables(
431430
&self,
432431
) -> &RefCell<FxHashMap<(Ty<'tcx>, Option<PolyExistentialTraitRef<'tcx>>), RValue<'gcc>>> {
@@ -572,8 +571,6 @@ impl<'gcc, 'tcx> HasWasmCAbiOpt for CodegenCx<'gcc, 'tcx> {
572571
}
573572

574573
impl<'gcc, 'tcx> LayoutOfHelpers<'tcx> for CodegenCx<'gcc, 'tcx> {
575-
type LayoutOfResult = TyAndLayout<'tcx>;
576-
577574
#[inline]
578575
fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! {
579576
if let LayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err {
@@ -585,8 +582,6 @@ impl<'gcc, 'tcx> LayoutOfHelpers<'tcx> for CodegenCx<'gcc, 'tcx> {
585582
}
586583

587584
impl<'gcc, 'tcx> FnAbiOfHelpers<'tcx> for CodegenCx<'gcc, 'tcx> {
588-
type FnAbiOfResult = &'tcx FnAbi<'tcx, Ty<'tcx>>;
589-
590585
#[inline]
591586
fn handle_fn_abi_err(
592587
&self,

compiler/rustc_codegen_gcc/src/debuginfo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::ops::Range;
22

33
use gccjit::{Location, RValue};
44
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind};
5-
use rustc_codegen_ssa::traits::{DebugInfoBuilderMethods, DebugInfoMethods};
5+
use rustc_codegen_ssa::traits::{DebugInfoBuilderMethods, DebugInfoCodegenMethods};
66
use rustc_data_structures::sync::Lrc;
77
use rustc_index::bit_set::BitSet;
88
use rustc_index::{Idx, IndexVec};
@@ -206,7 +206,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
206206
}
207207
}
208208

209-
impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
209+
impl<'gcc, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
210210
fn create_vtable_debuginfo(
211211
&self,
212212
_ty: Ty<'tcx>,

compiler/rustc_codegen_gcc/src/declare.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[cfg(feature = "master")]
22
use gccjit::{FnAttribute, ToRValue};
33
use gccjit::{Function, FunctionType, GlobalKind, LValue, RValue, Type};
4-
use rustc_codegen_ssa::traits::BaseTypeMethods;
4+
use rustc_codegen_ssa::traits::BaseTypeCodegenMethods;
55
use rustc_middle::ty::Ty;
66
use rustc_span::Symbol;
77
use rustc_target::abi::call::FnAbi;

compiler/rustc_codegen_gcc/src/int.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
use gccjit::{BinaryOp, ComparisonOp, FunctionType, Location, RValue, ToRValue, Type, UnaryOp};
66
use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
7-
use rustc_codegen_ssa::traits::{BackendTypes, BaseTypeMethods, BuilderMethods, OverflowOp};
7+
use rustc_codegen_ssa::traits::{BackendTypes, BaseTypeCodegenMethods, BuilderMethods, OverflowOp};
88
use rustc_middle::ty::{ParamEnv, Ty};
99
use rustc_target::abi::call::{ArgAbi, ArgAttributes, Conv, FnAbi, PassMode};
1010
use rustc_target::abi::Endian;

compiler/rustc_codegen_gcc/src/intrinsic/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ use rustc_codegen_ssa::errors::InvalidMonomorphization;
1313
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
1414
use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
1515
use rustc_codegen_ssa::traits::{
16-
ArgAbiMethods, BuilderMethods, ConstMethods, IntrinsicCallMethods,
16+
ArgAbiBuilderMethods, BuilderMethods, ConstCodegenMethods, IntrinsicCallBuilderMethods,
1717
};
1818
#[cfg(feature = "master")]
19-
use rustc_codegen_ssa::traits::{BaseTypeMethods, MiscMethods};
19+
use rustc_codegen_ssa::traits::{BaseTypeCodegenMethods, MiscCodegenMethods};
2020
use rustc_codegen_ssa::MemFlags;
2121
use rustc_middle::bug;
2222
use rustc_middle::ty::layout::LayoutOf;
@@ -94,7 +94,7 @@ fn get_simple_intrinsic<'gcc, 'tcx>(
9494
Some(cx.context.get_builtin_function(gcc_name))
9595
}
9696

97-
impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
97+
impl<'a, 'gcc, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
9898
fn codegen_intrinsic_call(
9999
&mut self,
100100
instance: Instance<'tcx>,
@@ -448,7 +448,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
448448
}
449449
}
450450

451-
impl<'a, 'gcc, 'tcx> ArgAbiMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
451+
impl<'a, 'gcc, 'tcx> ArgAbiBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
452452
fn store_fn_arg(
453453
&mut self,
454454
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,

compiler/rustc_codegen_gcc/src/intrinsic/simd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_codegen_ssa::errors::ExpectedPointerMutability;
1010
use rustc_codegen_ssa::errors::InvalidMonomorphization;
1111
use rustc_codegen_ssa::mir::operand::OperandRef;
1212
use rustc_codegen_ssa::mir::place::PlaceRef;
13-
use rustc_codegen_ssa::traits::{BaseTypeMethods, BuilderMethods};
13+
use rustc_codegen_ssa::traits::{BaseTypeCodegenMethods, BuilderMethods};
1414
#[cfg(feature = "master")]
1515
use rustc_hir as hir;
1616
use rustc_middle::mir::BinOp;

compiler/rustc_codegen_gcc/src/mono_item.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#[cfg(feature = "master")]
22
use gccjit::{FnAttribute, VarAttribute};
3-
use rustc_codegen_ssa::traits::PreDefineMethods;
3+
use rustc_codegen_ssa::traits::PreDefineCodegenMethods;
44
use rustc_hir::def::DefKind;
55
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
66
use rustc_middle::bug;
@@ -13,7 +13,7 @@ use crate::context::CodegenCx;
1313
use crate::type_of::LayoutGccExt;
1414
use crate::{attributes, base};
1515

16-
impl<'gcc, 'tcx> PreDefineMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
16+
impl<'gcc, 'tcx> PreDefineCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
1717
#[cfg_attr(not(feature = "master"), allow(unused_variables))]
1818
fn predefine_static(
1919
&self,

compiler/rustc_codegen_gcc/src/type_.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ use std::convert::TryInto;
55
use gccjit::CType;
66
use gccjit::{RValue, Struct, Type};
77
use rustc_codegen_ssa::common::TypeKind;
8-
use rustc_codegen_ssa::traits::{BaseTypeMethods, DerivedTypeMethods, TypeMembershipMethods};
8+
use rustc_codegen_ssa::traits::{
9+
BaseTypeCodegenMethods, DerivedTypeCodegenMethods, TypeMembershipCodegenMethods,
10+
};
911
use rustc_middle::ty::layout::TyAndLayout;
1012
use rustc_middle::{bug, ty};
1113
use rustc_target::abi::{AddressSpace, Align, Integer, Size};
@@ -121,7 +123,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
121123
}
122124
}
123125

124-
impl<'gcc, 'tcx> BaseTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
126+
impl<'gcc, 'tcx> BaseTypeCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
125127
fn type_i8(&self) -> Type<'gcc> {
126128
self.i8_type
127129
}
@@ -381,4 +383,4 @@ pub fn struct_fields<'gcc, 'tcx>(
381383
(result, packed)
382384
}
383385

384-
impl<'gcc, 'tcx> TypeMembershipMethods<'tcx> for CodegenCx<'gcc, 'tcx> {}
386+
impl<'gcc, 'tcx> TypeMembershipCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {}

compiler/rustc_codegen_gcc/src/type_of.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
use std::fmt::Write;
22

33
use gccjit::{Struct, Type};
4-
use rustc_codegen_ssa::traits::{BaseTypeMethods, DerivedTypeMethods, LayoutTypeMethods};
4+
use rustc_codegen_ssa::traits::{
5+
BaseTypeCodegenMethods, DerivedTypeCodegenMethods, LayoutTypeCodegenMethods,
6+
};
57
use rustc_middle::bug;
68
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
79
use rustc_middle::ty::print::with_no_trimmed_paths;
@@ -330,7 +332,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
330332
}
331333
}
332334

333-
impl<'gcc, 'tcx> LayoutTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
335+
impl<'gcc, 'tcx> LayoutTypeCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
334336
fn backend_type(&self, layout: TyAndLayout<'tcx>) -> Type<'gcc> {
335337
layout.gcc_type(self)
336338
}

compiler/rustc_codegen_llvm/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
285285
}
286286
}
287287

288-
impl<'ll, 'tcx> ArgAbiMethods<'tcx> for Builder<'_, 'll, 'tcx> {
288+
impl<'ll, 'tcx> ArgAbiBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
289289
fn store_fn_arg(
290290
&mut self,
291291
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,

compiler/rustc_codegen_llvm/src/asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
356356
}
357357
}
358358

359-
impl<'tcx> AsmMethods<'tcx> for CodegenCx<'_, 'tcx> {
359+
impl<'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
360360
fn codegen_global_asm(
361361
&self,
362362
template: &[InlineAsmTemplatePiece],

0 commit comments

Comments
 (0)