We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd8cc20 commit 52298aeCopy full SHA for 52298ae
compiler/rustc_hir_analysis/src/check/region.rs
@@ -755,6 +755,9 @@ fn resolve_local<'tcx>(
755
}
756
hir::ExprKind::Call(func, args) => {
757
// 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.
761
if let hir::ExprKind::Path(path) = &func.kind
762
&& let hir::QPath::Resolved(None, path) = path
763
&& let Res::SelfCtor(..) | Res::Def(DefKind::Ctor(..), _) = path.res
0 commit comments