File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -848,7 +848,7 @@ impl Ident {
848
848
/// Creates a new `Ident` with the given `string` as well as the specified
849
849
/// `span`.
850
850
/// The `string` argument must be a valid identifier permitted by the
851
- /// language, otherwise the function will panic.
851
+ /// language (including keywords, e.g. `self` or `fn`). Otherwise, the function will panic.
852
852
///
853
853
/// Note that `span`, currently in rustc, configures the hygiene information
854
854
/// for this identifier.
@@ -870,7 +870,10 @@ impl Ident {
870
870
}
871
871
872
872
/// Same as `Ident::new`, but creates a raw identifier (`r#ident`).
873
- #[ unstable( feature = "proc_macro_raw_ident" , issue = "54723" ) ]
873
+ /// The `string` argument be a valid identifier permitted by the language
874
+ /// (including keywords, e.g. `fn`). Keywords which are usable in path segments
875
+ /// (e.g. `self`, `super`) are not supported, and will cause a panic.
876
+ #[ stable( feature = "proc_macro_raw_ident" , since = "1.47.0" ) ]
874
877
pub fn new_raw ( string : & str , span : Span ) -> Ident {
875
878
Ident ( bridge:: client:: Ident :: new ( string, span. 0 , true ) )
876
879
}
You can’t perform that action at this time.
0 commit comments