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.
This commit is contained in:
est31 2021-10-16 04:37:30 +02:00
parent 1418df5888
commit ef018be5c4
4 changed files with 7 additions and 13 deletions

View file

@ -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.