Skip to content

Commit 0045fa1

Browse files
committed
Clarify when None is returned in cast_immediate function.
1 parent a9d29db commit 0045fa1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: compiler/rustc_codegen_ssa/src/mir/rvalue.rs

+2
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
278278

279279
/// Cast one of the immediates from an [`OperandValue::Immediate`]
280280
/// or an [`OperandValue::Pair`] to an immediate of the target type.
281+
///
282+
/// Returns `None` if the cast is not possible.
281283
fn cast_immediate(
282284
&self,
283285
bx: &mut Bx,

0 commit comments

Comments
 (0)