Skip to content

Commit

Permalink
Re-word documentation about fully parsed input
Browse files Browse the repository at this point in the history
Simple present indicative vs future tense, or according to Wiktionary on
'will', "expressing a present tense with some conditional or subjective
weakening".
  • Loading branch information
dtolnay committed Oct 20, 2024
1 parent d54f8c0 commit ca1d464
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,8 @@ pub fn parse<T: parse::Parse>(tokens: proc_macro::TokenStream) -> Result<T> {

/// Parse a proc-macro2 token stream into the chosen syntax tree node.
///
/// This function will check that the input is fully parsed. If there are
/// any unparsed tokens at the end of the stream, an error is returned.
/// This function enforces that the input is fully parsed. If there are any
/// unparsed tokens at the end of the stream, an error is returned.
///
/// This function parses a `proc_macro2::TokenStream` which is commonly useful
/// when the input comes from a node of the Syn syntax tree, for example the
Expand Down
12 changes: 6 additions & 6 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1236,14 +1236,14 @@ pub trait Parser: Sized {

/// Parse a proc-macro2 token stream into the chosen syntax tree node.
///
/// This function will check that the input is fully parsed. If there are
/// any unparsed tokens at the end of the stream, an error is returned.
/// This function enforces that the input is fully parsed. If there are any
/// unparsed tokens at the end of the stream, an error is returned.
fn parse2(self, tokens: TokenStream) -> Result<Self::Output>;

/// Parse tokens of source code into the chosen syntax tree node.
///
/// This function will check that the input is fully parsed. If there are
/// any unparsed tokens at the end of the stream, an error is returned.
/// This function enforces that the input is fully parsed. If there are any
/// unparsed tokens at the end of the stream, an error is returned.
#[cfg(feature = "proc-macro")]
#[cfg_attr(docsrs, doc(cfg(feature = "proc-macro")))]
fn parse(self, tokens: proc_macro::TokenStream) -> Result<Self::Output> {
Expand All @@ -1252,8 +1252,8 @@ pub trait Parser: Sized {

/// Parse a string of Rust code into the chosen syntax tree node.
///
/// This function will check that the input is fully parsed. If there are
/// any unparsed tokens at the end of the string, an error is returned.
/// This function enforces that the input is fully parsed. If there are any
/// unparsed tokens at the end of the string, an error is returned.
///
/// # Hygiene
///
Expand Down

0 comments on commit ca1d464

Please sign in to comment.