about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-06-02 11:10:34 -0400
committerRalf Jung <post@ralfj.de>2022-06-02 11:12:12 -0400
commitd5a590f53744add6e37eee19f4591f2be6d990f8 (patch)
tree3cba3ad0f9e0302e7335271905276533af5649f6 /compiler/rustc_codegen_ssa/src
parentfafccdced349d655db83e0ec30e91b85dcf65cf7 (diff)
downloadrust-d5a590f53744add6e37eee19f4591f2be6d990f8.tar.gz
rust-d5a590f53744add6e37eee19f4591f2be6d990f8.zip
comment
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/rvalue.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
index 90afb7adcb2..81c1897694c 100644
--- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
@@ -270,6 +270,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                         PointerCast::MutToConstPointer | PointerCast::ArrayToPointer,
                     )
                     | mir::CastKind::Misc
+                    // Since int2ptr can have arbitrary integer types as input (so we have to do
+                    // sign extension and all that), it is currently best handled in the same code
+                    // path as the other integer-to-X casts.
                     | mir::CastKind::PointerFromExposedAddress => {
                         assert!(bx.cx().is_backend_immediate(cast));
                         let ll_t_out = bx.cx().immediate_backend_type(cast);