AlexEne / AlexEne/rust_hawktracer_normal_macro

Use fully qualified names in macros

Đang mở
#5 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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}`).

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.