diff options
| author | Fabian Zaiser <fabian.zaiser@gmail.com> | 2020-11-07 14:28:55 +0000 |
|---|---|---|
| committer | Fabian Zaiser <fabian.zaiser@gmail.com> | 2020-11-11 12:10:52 +0000 |
| commit | de84ad95b4b097e504171c7c606bf3715803c13b (patch) | |
| tree | 79e31aeb6e1fa6c147157399446837511900dcfc /compiler/rustc_resolve/src | |
| parent | cf9cf7c923eb01146971429044f216a3ca905e06 (diff) | |
| download | rust-de84ad95b4b097e504171c7c606bf3715803c13b.tar.gz rust-de84ad95b4b097e504171c7c606bf3715803c13b.zip | |
Implement destructuring assignment for structs and slices
Co-authored-by: varkor <github@varkor.com>
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 2337f0d09ab..2149fd7e011 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -298,9 +298,7 @@ impl<'a> PathSource<'a> { _, ) | Res::SelfCtor(..)), - PathSource::TupleStruct(..) => { - matches!(res, Res::Def(DefKind::Ctor(_, CtorKind::Fn), _) | Res::SelfCtor(..)) - } + PathSource::TupleStruct(..) => res.expected_in_tuple_struct_pat(), PathSource::Struct => matches!(res, Res::Def( DefKind::Struct | DefKind::Union |
