Skip to content

Commit aaff8b1

Browse files
committed
rustc_mir_build: Clarify that 'mirrored' does not mean 'flipped' or 'reversed'
My intuition for 'mirrored' is that it means 'flipped' or 'reversed'. Clarify that that is not what is meant to 'mirror' the THIR from the HIR.
1 parent 1f3bf23 commit aaff8b1

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_mir_build/src/thir/cx

1 file changed

+2
-0
lines changed

compiler/rustc_mir_build/src/thir/cx/expr.rs

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ use crate::thir::cx::Cx;
2626
use crate::thir::util::UserAnnotatedTyHelpers;
2727

2828
impl<'tcx> Cx<'tcx> {
29+
// Create a THIR expression that is "the same" as the HIR expression. The
30+
// term "mirror" in this case does not refer to "flipped" or "reversed".
2931
pub(crate) fn mirror_expr(&mut self, expr: &'tcx hir::Expr<'tcx>) -> ExprId {
3032
// `mirror_expr` is recursing very deep. Make sure the stack doesn't overflow.
3133
ensure_sufficient_stack(|| self.mirror_expr_inner(expr))

0 commit comments

Comments
 (0)