diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-09-17 10:15:26 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-09-17 10:24:43 +1000 |
| commit | a8d22eb39eafcc19d4c3db4f24582d869c8fdef2 (patch) | |
| tree | 2c2d44301afa42a2d459af3ed72e44922cf025fb /compiler/rustc_codegen_gcc/src/common.rs | |
| parent | 540fcc617a7d0ab408e81e5668cfa3971233353d (diff) | |
| download | rust-a8d22eb39eafcc19d4c3db4f24582d869c8fdef2.tar.gz rust-a8d22eb39eafcc19d4c3db4f24582d869c8fdef2.zip | |
Rename supertraits of `CodegenMethods`.
Supertraits of `BuilderMethods` are all called `XyzBuilderMethods`. Supertraits of `CodegenMethods` are all called `XyzMethods`. This commit changes the latter to `XyzCodegenMethods`, for consistency.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/common.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs index dca6b6494f9..8e2220a2a9b 100644 --- a/compiler/rustc_codegen_gcc/src/common.rs +++ b/compiler/rustc_codegen_gcc/src/common.rs @@ -1,5 +1,7 @@ use gccjit::{LValue, RValue, ToRValue, Type}; -use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods, MiscMethods, StaticMethods}; +use rustc_codegen_ssa::traits::{ + BaseTypeCodegenMethods, ConstCodegenMethods, MiscCodegenMethods, StaticCodegenMethods, +}; use rustc_middle::mir::interpret::{ConstAllocation, GlobalAlloc, Scalar}; use rustc_middle::mir::Mutability; use rustc_middle::ty::layout::LayoutOf; @@ -55,7 +57,7 @@ pub fn type_is_pointer(typ: Type<'_>) -> bool { typ.get_pointee().is_some() } -impl<'gcc, 'tcx> ConstMethods<'tcx> for CodegenCx<'gcc, 'tcx> { +impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { fn const_null(&self, typ: Type<'gcc>) -> RValue<'gcc> { if type_is_pointer(typ) { self.context.new_null(typ) } else { self.const_int(typ, 0) } } |
