Skip to content

Commit

Permalink
Add doc cfg on Error::new_spanned
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 1, 2024
1 parent 649e426 commit 1728630
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ impl Error {
/// When in doubt it's recommended to stick to `Error::new` (or
/// `ParseStream::error`)!
#[cfg(feature = "printing")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "printing")))]
pub fn new_spanned<T: ToTokens, U: Display>(tokens: T, message: U) -> Self {
return new_spanned(tokens.into_token_stream(), message.to_string());

Expand Down

0 comments on commit 1728630

Please sign in to comment.