Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
remove a nightly only example
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus committed Jun 6, 2024
1 parent 71a8d98 commit 50ff1ad
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,7 @@ Event {
When the annotated function returns, a span event for its execution is emitted. The extent of a span event is a range, where the start is the time the function began executing, and the end is the time the function returned.
On nightly compilers, the same attributes can also be applied to blocks instead of functions:
```
#![feature(proc_macro_hygiene, stmt_expr_attributes)]
# use std::{thread, time::Duration};
# fn main() {
let sleep_ms = 1200;
#[emit::span("wait a bit", sleep_ms)]
{
thread::sleep(Duration::from_millis(sleep_ms))
}
# }
```
On nightly compilers, the same attributes can also be applied to blocks instead of functions.
Asynchronous functions are also supported:
Expand Down

0 comments on commit 50ff1ad

Please sign in to comment.