Skip to content

Commit 52298ae

Browse files
committed
Add comment.
1 parent bd8cc20 commit 52298ae

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_hir_analysis/src/check

1 file changed

+3
-0
lines changed

compiler/rustc_hir_analysis/src/check/region.rs

+3
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,9 @@ fn resolve_local<'tcx>(
755755
}
756756
hir::ExprKind::Call(func, args) => {
757757
// Recurse into tuple constructors, such as `Some(&temp())`.
758+
//
759+
// That way, there is no difference between `Some(..)` and `Some { 0: .. }`,
760+
// even though the former is syntactically a function call.
758761
if let hir::ExprKind::Path(path) = &func.kind
759762
&& let hir::QPath::Resolved(None, path) = path
760763
&& let Res::SelfCtor(..) | Res::Def(DefKind::Ctor(..), _) = path.res

0 commit comments

Comments
 (0)