Skip to content

Commit 20d2c96

Browse files
committed
io: add track_caller caller to no-rt io driver
This change adds a case that was missing from the original PR, tokio-rs#4793. The `io::driver::Handle::current` function was only covered by `#[track_caller]` in the case that the `rt` feature is enabled, however it was missing in the case that the `rt` feture isn't enabled (in which case a panic would be more common). Refs: tokio-rs#4413
1 parent 5288e1e commit 20d2c96

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tokio/src/io/driver/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ cfg_not_rt! {
282282
///
283283
/// This function panics if there is no current reactor set, or if the `rt`
284284
/// feature flag is not enabled.
285+
#[track_caller]
285286
pub(super) fn current() -> Self {
286287
panic!("{}", crate::util::error::CONTEXT_MISSING_ERROR)
287288
}

0 commit comments

Comments
 (0)