diff options
| author | Michael Goulet <michael@errs.io> | 2024-03-21 17:11:06 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-03-22 11:13:29 -0400 |
| commit | ff0c31e6b9bc8e847c3b1b9d61793325edfacf47 (patch) | |
| tree | 366bdcf6c869a19f56b8b3c2d42bf8ac6a5cf3a1 /compiler/rustc_codegen_ssa/src | |
| parent | f0f224a37f117104358f4d807d71037256f5a646 (diff) | |
| download | rust-ff0c31e6b9bc8e847c3b1b9d61793325edfacf47.tar.gz rust-ff0c31e6b9bc8e847c3b1b9d61793325edfacf47.zip | |
Programmatically convert some of the pat ctors
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/base.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs index c316d19e041..13809ef72ec 100644 --- a/compiler/rustc_codegen_ssa/src/base.rs +++ b/compiler/rustc_codegen_ssa/src/base.rs @@ -193,8 +193,8 @@ pub fn unsize_ptr<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( ) -> (Bx::Value, Bx::Value) { debug!("unsize_ptr: {:?} => {:?}", src_ty, dst_ty); match (src_ty.kind(), dst_ty.kind()) { - (&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(ty::TypeAndMut { ty: b, .. })) - | (&ty::RawPtr(ty::TypeAndMut { ty: a, .. }), &ty::RawPtr(ty::TypeAndMut { ty: b, .. })) => { + (&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(b, _)) + | (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => { assert_eq!(bx.cx().type_is_sized(a), old_info.is_none()); (src, unsized_info(bx, a, b, old_info)) } diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index fcd7fa9247b..64448441acb 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -138,7 +138,7 @@ fn push_debuginfo_type_name<'tcx>( output.push(')'); } } - ty::RawPtr(ty::TypeAndMut { ty: inner_type, mutbl }) => { + ty::RawPtr(inner_type, mutbl) => { if cpp_like_debuginfo { match mutbl { Mutability::Not => output.push_str("ptr_const$<"), |
