Skip to content

Commit

Permalink
Copy Ident::new_raw comment from proc_macro
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jun 20, 2022
1 parent c08b24a commit 10a20e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,11 @@ impl Ident {
Ident::_new(imp::Ident::new(string, span.inner))
}

/// Same as `Ident::new`, but creates a raw identifier (`r#ident`).
/// Same as `Ident::new`, but creates a raw identifier (`r#ident`). The
/// `string` argument must be a valid identifier permitted by the language
/// (including keywords, e.g. `fn`). Keywords which are usable in path
/// segments (e.g. `self`, `super`) are not supported, and will cause a
/// panic.
pub fn new_raw(string: &str, span: Span) -> Self {
Ident::_new_raw(string, span)
}
Expand Down

0 comments on commit 10a20e0

Please sign in to comment.