mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
Simplify RefTokenTreeCursor::look_ahead.
It's only ever used with a lookahead of 0, so this commit removes the lookahead and renames it `peek`.
This commit is contained in:
@@ -86,7 +86,7 @@ fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option<Span> {
|
||||
while let Some(curr) = cursor.next() {
|
||||
if !prev_is_dollar
|
||||
&& let Some(span) = is_crate_keyword(curr)
|
||||
&& let Some(next) = cursor.look_ahead(0)
|
||||
&& let Some(next) = cursor.peek()
|
||||
&& is_token(next, &TokenKind::PathSep)
|
||||
{
|
||||
return Some(span);
|
||||
|
||||
Reference in New Issue
Block a user