diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/tracing/tests/no_subscriber.rs | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/tracing/tests/no_subscriber.rs')
-rw-r--r-- | vendor/tracing/tests/no_subscriber.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/tracing/tests/no_subscriber.rs b/vendor/tracing/tests/no_subscriber.rs index 5f927c1de..d15a2c8a1 100644 --- a/vendor/tracing/tests/no_subscriber.rs +++ b/vendor/tracing/tests/no_subscriber.rs @@ -1,14 +1,15 @@ #![cfg(feature = "std")] -use tracing::subscriber::{self, NoSubscriber}; +use tracing_mock::subscriber; #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)] #[test] fn no_subscriber_disables_global() { // Reproduces https://github.com/tokio-rs/tracing/issues/1999 - let (subscriber, handle) = tracing_mock::subscriber::mock().done().run_with_handle(); - subscriber::set_global_default(subscriber).expect("setting global default must succeed"); - subscriber::with_default(NoSubscriber::default(), || { + let (subscriber, handle) = subscriber::mock().only().run_with_handle(); + tracing::subscriber::set_global_default(subscriber) + .expect("setting global default must succeed"); + tracing::subscriber::with_default(tracing::subscriber::NoSubscriber::default(), || { tracing::info!("this should not be recorded"); }); handle.assert_finished(); |