From 1aa7a397de9da4fb6c4189ff37507dffa9c9d928 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Wed, 12 Oct 2022 12:26:57 -0700 Subject: [PATCH] +docs --- tokio/src/task/local.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs index 3119af5f28f..52e86fd059a 100644 --- a/tokio/src/task/local.rs +++ b/tokio/src/task/local.rs @@ -1020,6 +1020,12 @@ fn thread_id() -> Option { #[cfg(all(test, not(loom)))] mod tests { use super::*; + + // Does a `LocalSet` running on a current-thread runtime...basically work? + // + // This duplicates a test in `tests/task_local_set.rs`, but because this is + // a lib test, it wil run under Miri, so this is necessary to catch stacked + // borrows violations in the `LocalSet` implementation. #[test] fn local_current_thread_scheduler() { let f = async {