diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2025-06-11 00:28:33 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2025-06-11 00:42:14 -0700 |
| commit | b88c0061c409387b3d3761c530302c3557da48e8 (patch) | |
| tree | ca0299998780ac1e977303717bc076ce978c84a8 /compiler/rustc_codegen_ssa/src | |
| parent | 1c047506f94cd2d05228eb992b0a6bbed1942349 (diff) | |
compiler: Change c_int_width to be an integer type
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/traits/type_.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/type_.rs b/compiler/rustc_codegen_ssa/src/traits/type_.rs index c3fc21a9285..70331b72353 100644 --- a/compiler/rustc_codegen_ssa/src/traits/type_.rs +++ b/compiler/rustc_codegen_ssa/src/traits/type_.rs @@ -44,10 +44,10 @@ pub trait DerivedTypeCodegenMethods<'tcx>: BaseTypeCodegenMethods + MiscCodegenMethods<'tcx> + HasTyCtxt<'tcx> + HasTypingEnv<'tcx> { fn type_int(&self) -> Self::Type { - match &self.sess().target.c_int_width[..] { - "16" => self.type_i16(), - "32" => self.type_i32(), - "64" => self.type_i64(), + match &self.sess().target.c_int_width { + 16 => self.type_i16(), + 32 => self.type_i32(), + 64 => self.type_i64(), width => bug!("Unsupported c_int_width: {}", width), } } |
