diff options
| author | Markus Reiter <me@reitermark.us> | 2024-05-18 23:45:15 +0200 |
|---|---|---|
| committer | Markus Reiter <me@reitermark.us> | 2024-07-21 18:21:33 +0200 |
| commit | b455e437298683fce04aefa29951cbb1ada3c929 (patch) | |
| tree | dbf10959fc17ca51185260a6fed363d8c7cc95ca | |
| parent | 832ccdc8df77a94d4f6b1835ebf66253fbe96bf3 (diff) | |
| download | rust-b455e437298683fce04aefa29951cbb1ada3c929.tar.gz rust-b455e437298683fce04aefa29951cbb1ada3c929.zip | |
Clarify when `None` is returned in `cast_immediate` function.
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index b2c12fa6950..c43bc33f5d2 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -282,6 +282,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { /// Cast one of the immediates from an [`OperandValue::Immediate`] /// or an [`OperandValue::Pair`] to an immediate of the target type. + /// + /// Returns `None` if the cast is not possible. fn cast_immediate( &self, bx: &mut Bx, |
