diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2025-05-02 23:20:14 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2025-06-13 09:20:55 +0200 |
| commit | e71a93b5c2a7d0d4377ce7a9692ed75dec4aa6b5 (patch) | |
| tree | 3190cca95f9e11ea1af1a51d7a5fb4c04d7972ac /compiler/rustc_hir_analysis/src/check | |
| parent | ff5ba7aa74f53b8a9f2cf5024628f959ed1520cb (diff) | |
| download | rust-e71a93b5c2a7d0d4377ce7a9692ed75dec4aa6b5.tar.gz rust-e71a93b5c2a7d0d4377ce7a9692ed75dec4aa6b5.zip | |
Add comment.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check')
| -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 |
