Skip to content

Commit e25c9ae

Browse files
committed
lower_constness
1 parent 0dd5831 commit e25c9ae

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • compiler/rustc_ast_lowering/src

compiler/rustc_ast_lowering/src/expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,9 +1395,10 @@ impl<'hir, R: ResolverAstLoweringExt<'hir>> LoweringContext<'_, 'hir, R> {
13951395
// knows that a `FnDecl` output type like `-> &str` actually means
13961396
// "coroutine that returns &str", rather than directly returning a `&str`.
13971397
kind: hir::ClosureKind::CoroutineClosure(coroutine_desugaring),
1398-
constness: hir::Constness::NotConst,
1398+
constness: self.lower_constness(constness),
13991399
explicit_captures: &[],
14001400
});
1401+
14011402
hir::ExprKind::Closure(c)
14021403
}
14031404

0 commit comments

Comments
 (0)