about summary refs log tree commit diff
path: root/compiler/rustc_resolve
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2021-10-16 04:37:30 +0200
committerest31 <MTest31@outlook.com>2021-10-16 07:18:15 +0200
commitef018be5c49d7a0bb8ad8e3485111e8b2ab9c5ac (patch)
tree7d43eb40bd52d7d62ad1ccb552c8dc66b3a91f9d /compiler/rustc_resolve
parent1418df5888131578eae04b39360f30df4ffe5599 (diff)
downloadrust-ef018be5c49d7a0bb8ad8e3485111e8b2ab9c5ac.tar.gz
rust-ef018be5c49d7a0bb8ad8e3485111e8b2ab9c5ac.zip
Update the syn crate and adopt let_else in three more places
The syn crate has gained support for let_else syntax in version 1.0.76,
see https://github.com/dtolnay/syn/pull/1057 .

In the three instances that use let_else, we've sent code through an
attr macro, which would create compile errors when there was no
let_else support in syn. To avoid this, we ran
`cargo +nightly update -p syn` for updating the syn crate.
Diffstat (limited to 'compiler/rustc_resolve')
-rw-r--r--compiler/rustc_resolve/src/late/lifetimes.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs
index eb6f302a11d..94563400a8b 100644
--- a/compiler/rustc_resolve/src/late/lifetimes.rs
+++ b/compiler/rustc_resolve/src/late/lifetimes.rs
@@ -1057,9 +1057,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
                     match param.kind {
                         GenericParamKind::Lifetime { .. } => {
                             let (name, reg) = Region::early(&self.tcx.hir(), &mut index, &param);
-                            let def_id = if let Region::EarlyBound(_, def_id, _) = reg {
-                                def_id
-                            } else {
+                            let Region::EarlyBound(_, def_id, _) = reg else {
                                 bug!();
                             };
                             // We cannot predict what lifetimes are unused in opaque type.