Skip to content

Commit

Permalink
Improve lookahead documentation
Browse files Browse the repository at this point in the history
Given that a colleague also was not able to spot my mistake on its own I know three people which missed the this issue.
It might be obvious for those with a better understanding so please feel free to reject (or reword) this proposal :)

https://discord.com/channels/273534239310479360/512792629516173323/960864849305432095
  • Loading branch information
ZuseZ4 authored Apr 5, 2022
1 parent a0f0bb3 commit 7e58d02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lookahead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ use std::cell::RefCell;
/// [`ParseStream::peek`]: crate::parse::ParseBuffer::peek
/// [`ParseStream::lookahead1`]: crate::parse::ParseBuffer::lookahead1
///
/// Please be aware that advancing the source stream with parse() will not advance
/// the lookahead object.
///
/// # Example
///
/// ```
Expand Down Expand Up @@ -136,7 +139,7 @@ impl<'a> Lookahead1<'a> {
/// Types that can be parsed by looking at just one token.
///
/// Use [`ParseStream::peek`] to peek one of these types in a parse stream
/// without consuming it from the stream.
/// without consuming it from the stream.
///
/// This trait is sealed and cannot be implemented for types outside of Syn.
///
Expand Down

0 comments on commit 7e58d02

Please sign in to comment.