Skip to content

Commit

Permalink
Set the call_site span on the generated macro names.
Browse files Browse the repository at this point in the history
  • Loading branch information
jebrosen committed Jun 29, 2019
1 parent 2d27e3c commit c475b5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/codegen/src/attribute/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ fn generate_internal_uri_macro(route: &Route) -> TokenStream2 {
line_column.line.hash(&mut hasher);
line_column.column.hash(&mut hasher);

let generated_macro_name = route.function.ident.prepend(URI_MACRO_PREFIX);
let mut generated_macro_name = route.function.ident.prepend(URI_MACRO_PREFIX);
generated_macro_name.set_span(Span::call_site().into());
let inner_generated_macro_name = generated_macro_name.append(&hasher.finish().to_string());
let route_uri = route.attribute.path.origin.0.to_string();

Expand Down

0 comments on commit c475b5a

Please sign in to comment.