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:
parent
1418df5888
commit
ef018be5c4
@ -2728,9 +2728,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.24"
|
||||
version = "1.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
|
||||
checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
@ -5090,9 +5090,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.65"
|
||||
version = "1.0.80"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f3a1d708c221c5a612956ef9f75b37e454e88d1f7b899fbd3a18d4252012d663"
|
||||
checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -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, ¶m);
|
||||
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.
|
||||
|
@ -521,9 +521,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
|
||||
|
||||
let traits =
|
||||
(self.tcx.lang_items().unsize_trait(), self.tcx.lang_items().coerce_unsized_trait());
|
||||
let (unsize_did, coerce_unsized_did) = if let (Some(u), Some(cu)) = traits {
|
||||
(u, cu)
|
||||
} else {
|
||||
let (Some(unsize_did), Some(coerce_unsized_did)) = traits else {
|
||||
debug!("missing Unsize or CoerceUnsized traits");
|
||||
return Err(TypeError::Mismatch);
|
||||
};
|
||||
|
@ -1678,9 +1678,7 @@ impl<'a, 'tcx> InferBorrowKind<'a, 'tcx> {
|
||||
diag_expr_id: hir::HirId,
|
||||
) {
|
||||
let tcx = self.fcx.tcx;
|
||||
let upvar_id = if let PlaceBase::Upvar(upvar_id) = place_with_id.place.base {
|
||||
upvar_id
|
||||
} else {
|
||||
let PlaceBase::Upvar(upvar_id) = place_with_id.place.base else {
|
||||
return;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user