Skip to content

Commit 1d2e172

Browse files
committed
Remove unnecessary NtIdent in Token::is_whole_expr.
The comment on this function explains that it's a specialized version of `maybe_whole_expr`. But `maybe_whole_expr` doesn't do anything with `NtIdent`, so `is_whole_expr` also doesn't need to.
1 parent bbef975 commit 1d2e172

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_ast/src/token.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ impl Token {
531531
/// (which happens while parsing the result of macro expansion)?
532532
pub fn is_whole_expr(&self) -> bool {
533533
if let Interpolated(ref nt) = self.kind
534-
&& let NtExpr(_) | NtLiteral(_) | NtPath(_) | NtIdent(..) | NtBlock(_) = **nt
534+
&& let NtExpr(_) | NtLiteral(_) | NtPath(_) | NtBlock(_) = **nt
535535
{
536536
return true;
537537
}

0 commit comments

Comments
 (0)