Rollup merge of #94445 - c410-f3r:more-let-chains, r=cjgillot
4 - Make more use of `let_chains` Continuation of #94376. cc #53667
This commit is contained in:
commit
5be38d2bb3
7 changed files with 72 additions and 76 deletions
|
@ -97,15 +97,15 @@ macro_rules! maybe_whole {
|
|||
#[macro_export]
|
||||
macro_rules! maybe_recover_from_interpolated_ty_qpath {
|
||||
($self: expr, $allow_qpath_recovery: expr) => {
|
||||
if $allow_qpath_recovery && $self.look_ahead(1, |t| t == &token::ModSep) {
|
||||
if let token::Interpolated(nt) = &$self.token.kind {
|
||||
if let token::NtTy(ty) = &**nt {
|
||||
if $allow_qpath_recovery
|
||||
&& $self.look_ahead(1, |t| t == &token::ModSep)
|
||||
&& let token::Interpolated(nt) = &$self.token.kind
|
||||
&& let token::NtTy(ty) = &**nt
|
||||
{
|
||||
let ty = ty.clone();
|
||||
$self.bump();
|
||||
return $self.maybe_recover_from_bad_qpath_stage_2($self.prev_token.span, ty);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue