You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: global_dispatch.rs
    path of file: ./repos/tracing/tracing-core/tests
    
    the code of the file until where you have to start completion: mod common;

use common::*;
use tracing_core::dispatch::*;
#[test]
fn global_dispatch() {
    static TEST: TestCollectorA = TestCollectorA;
    set_global_default(Dispatch::from_static(&TEST)).expect("global dispatch set failed");
    get_default(|current| assert!(current.is::<TestCollectorA>(), "global dispatch get failed"));

    #[cfg(feature = "std")]
    with_default(&Dispatch::new(TestCollectorB), || {
        get_default(|current| {
            assert!(
                current.is::<TestCollectorB>(),
                "thread-local over
    
fn global_dispatch() {
    static TEST: TestCollectorA = TestCollectorA;
    set_global_default(Dispatch::from_static(&TEST)).expect("global dispatch set failed");
    get_default(|current| assert!(current.is::<TestCollectorA>(), "global dispatch get failed"));

    #[cfg(feature = "std")]
    with_default(&Dispatch::new(TestCollectorB), || {
        get_default(|current| {
            assert!(
                current.is::<TestCollectorB>(),
                "thread-local override of global dispatch failed"
            )
        });
    });

    get_default(|current| {
        assert!(
            current.is::<TestCollectorA>(),
            "reset to global override failed"
        )
    });

    set_global_default(Dispatch::from_static(&TEST))
        .expect_err("double global dispatch set succeeded");
}