Gate some recovery behind a flag

Mainly in `expr.rs`
This commit is contained in:
Nilstrieb 2022-10-28 20:44:26 +02:00
parent 5237c4d83d
commit 29e50e8d35
No known key found for this signature in database
3 changed files with 32 additions and 6 deletions

View file

@ -104,6 +104,7 @@ macro_rules! maybe_whole {
macro_rules! maybe_recover_from_interpolated_ty_qpath {
($self: expr, $allow_qpath_recovery: expr) => {
if $allow_qpath_recovery
&& $self.may_recover()
&& $self.look_ahead(1, |t| t == &token::ModSep)
&& let token::Interpolated(nt) = &$self.token.kind
&& let token::NtTy(ty) = &**nt