AlexEne / AlexEne/rust_hawktracer_normal_macro

Use fully qualified names in macros

Abierto
#5 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Macro implementations should not be depending on imports done by the caller.

https://github.com/AlexEne/rust_hawktracer_normal_macro/blob/b729096df0d243a203a1e81efd917b9876d4033b/src/lib.rs#L22

A user of `rust_hawktracer` running code with edition 2018 should be able to add a scoped tracepoints simply doing
```rust
rust_hawktracer::scoped_tracepoint!(_something_to_trace)
```

This is currently not possible, so the alternative seems being
* importing all `rust_hawktracer` with the risk of polluting the namespace
* importing the symbols that `scoped_tracepoint` expects (`rust_hawktracer::{add_cached_mapping, scoped_tracepoint, ScopedTracepoint}`).

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.