Skip to content

Commit

Permalink
Handle $crate special case
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 19, 2023
1 parent 6c0e838 commit 7e8f978
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions precompiled/proc-macro2/src/watt/mod.rs
Expand Up @@ -78,6 +78,8 @@ pub fn load(buf: &mut InputBuffer) -> TokenStream {
let repr = buf.read_str(len as usize);
let ident = if let Some(repr) = repr.strip_prefix("r#") {
proc_macro2::Ident::new_raw(repr, proc_macro2::Span::call_site())
} else if repr == "$crate" {
proc_macro2::Ident::new("crate", proc_macro2::Span::call_site())
} else {
proc_macro2::Ident::new(repr, proc_macro2::Span::call_site())
};
Expand Down

0 comments on commit 7e8f978

Please sign in to comment.