From de51a1d69f720af6867d2ad200b4c1570c73e0ed Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Wed, 24 Aug 2022 08:17:20 -0700 Subject: [PATCH] move field --- tokio/src/runtime/builder.rs | 6 +++--- tokio/src/runtime/config.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs index d8533789148..755af6ddda2 100644 --- a/tokio/src/runtime/builder.rs +++ b/tokio/src/runtime/builder.rs @@ -85,13 +85,13 @@ pub struct Builder { /// How many ticks before yielding to the driver for timer and I/O events? pub(super) event_interval: u32, - #[cfg(tokio_unstable)] - pub(super) unhandled_panic: UnhandledPanic, - /// When true, the multi-threade scheduler LIFO slot should not be used. /// /// This option should only be exposed as unstable. pub(super) disable_lifo_slot: bool, + + #[cfg(tokio_unstable)] + pub(super) unhandled_panic: UnhandledPanic, } cfg_unstable! { diff --git a/tokio/src/runtime/config.rs b/tokio/src/runtime/config.rs index 78ab1601542..f41e45c242c 100644 --- a/tokio/src/runtime/config.rs +++ b/tokio/src/runtime/config.rs @@ -13,10 +13,6 @@ pub(crate) struct Config { /// Callback for a worker unparking itself pub(crate) after_unpark: Option, - #[cfg(tokio_unstable)] - /// How to respond to unhandled task panics. - pub(crate) unhandled_panic: crate::runtime::UnhandledPanic, - /// The multi-threaded scheduler includes a per-worker LIFO slot used to /// store the last scheduled task. This can improve certain usage patterns, /// especially message passing between tasks. However, this LIFO slot is not @@ -25,4 +21,8 @@ pub(crate) struct Config { /// Eventually, the LIFO slot **will** become stealable, however as a /// stop-gap, this unstable option lets users disable the LIFO task. pub(crate) disable_lifo_slot: bool, + + #[cfg(tokio_unstable)] + /// How to respond to unhandled task panics. + pub(crate) unhandled_panic: crate::runtime::UnhandledPanic, }