diff options
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/region.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/region.rs b/compiler/rustc_hir_analysis/src/check/region.rs index e2f15af68c3..c458878da15 100644 --- a/compiler/rustc_hir_analysis/src/check/region.rs +++ b/compiler/rustc_hir_analysis/src/check/region.rs @@ -755,6 +755,9 @@ fn resolve_local<'tcx>( } hir::ExprKind::Call(func, args) => { // Recurse into tuple constructors, such as `Some(&temp())`. + // + // That way, there is no difference between `Some(..)` and `Some { 0: .. }`, + // even though the former is syntactically a function call. if let hir::ExprKind::Path(path) = &func.kind && let hir::QPath::Resolved(None, path) = path && let Res::SelfCtor(_) | Res::Def(DefKind::Ctor(_, CtorKind::Fn), _) = path.res |
