Skip to content

Commit

Permalink
Improve macro sanitiziation
Browse files Browse the repository at this point in the history
  • Loading branch information
jam1garner committed Apr 8, 2020
1 parent 9e2edfe commit 0f55a2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions impl/src/lib.rs
Expand Up @@ -50,7 +50,7 @@ pub fn submit(input: proc_macro::TokenStream) -> proc_macro::TokenStream {

let expanded = quote! {
#[allow(non_upper_case_globals)]
#[#prefix inventory::ctor]
#[#prefix ::inventory::ctor]
fn #init() {
// TODO: once existential type is stable, store the caller's
// expression into a static and string those statics together into
Expand All @@ -72,7 +72,7 @@ pub fn submit(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
// inventory::submit(VALUE.as_mut().unwrap());
// }

#prefix inventory::submit({ #expr });
#prefix ::inventory::submit({ #expr });
}
};

Expand Down

0 comments on commit 0f55a2f

Please sign in to comment.