Sha256: 94715e8014bc4c67cebe830f3d800c4cb0937bc6245de4b5410e5729bb2c7f9a

Contents?: true

Size: 672 Bytes

Versions: 30

Compression:

Stored size: 672 Bytes

Contents

#![cfg(all(feature = "full", not(target_os = "wasi")))] // Wasi doesn't support threading

#[allow(unused_imports)]
use std as tokio;

use ::tokio as tokio1;

mod test {
    pub use ::tokio;
}

async fn compute() -> usize {
    let join = tokio1::spawn(async { 1 });
    join.await.unwrap()
}

#[tokio1::main(crate = "tokio1")]
async fn compute_main() -> usize {
    compute().await
}

#[test]
fn crate_rename_main() {
    assert_eq!(1, compute_main());
}

#[tokio1::test(crate = "tokio1")]
async fn crate_rename_test() {
    assert_eq!(1, compute().await);
}

#[test::tokio::test(crate = "test::tokio")]
async fn crate_path_test() {
    assert_eq!(1, compute().await);
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/tokio-1.43.0/tests/macros_rename_test.rs
wasmtime-28.0.0 ./ext/cargo-vendor/tokio-1.43.0/tests/macros_rename_test.rs
wasmtime-27.0.0 ./ext/cargo-vendor/tokio-1.41.1/tests/macros_rename_test.rs
wasmtime-26.0.0 ./ext/cargo-vendor/tokio-1.41.0/tests/macros_rename_test.rs
wasmtime-25.0.2 ./ext/cargo-vendor/tokio-1.40.0/tests/macros_rename_test.rs
wasmtime-25.0.1 ./ext/cargo-vendor/tokio-1.39.3/tests/macros_rename_test.rs
wasmtime-25.0.0 ./ext/cargo-vendor/tokio-1.39.3/tests/macros_rename_test.rs
wasmtime-24.0.0 ./ext/cargo-vendor/tokio-1.39.3/tests/macros_rename_test.rs
wasmtime-23.0.2 ./ext/cargo-vendor/tokio-1.36.0/tests/macros_rename_test.rs
wasmtime-22.0.0 ./ext/cargo-vendor/tokio-1.36.0/tests/macros_rename_test.rs
wasmtime-21.0.1 ./ext/cargo-vendor/tokio-1.36.0/tests/macros_rename_test.rs
wasmtime-20.0.2 ./ext/cargo-vendor/tokio-1.36.0/tests/macros_rename_test.rs
wasmtime-20.0.0 ./ext/cargo-vendor/tokio-1.36.0/tests/macros_rename_test.rs
wasmtime-18.0.3 ./ext/cargo-vendor/tokio-1.36.0/tests/macros_rename_test.rs
wasmtime-17.0.1 ./ext/cargo-vendor/tokio-1.35.1/tests/macros_rename_test.rs
wasmtime-17.0.0 ./ext/cargo-vendor/tokio-1.35.1/tests/macros_rename_test.rs
wasmtime-16.0.0 ./ext/cargo-vendor/tokio-1.35.1/tests/macros_rename_test.rs
wasmtime-15.0.1 ./ext/cargo-vendor/tokio-1.35.1/tests/macros_rename_test.rs
wasmtime-15.0.0 ./ext/cargo-vendor/tokio-1.35.1/tests/macros_rename_test.rs
wasmtime-14.0.4 ./ext/cargo-vendor/tokio-1.33.0/tests/macros_rename_test.rs