[INFO] fetching crate ndk-context 0.1.0... [INFO] testing ndk-context-0.1.0 against 1.60.0 for beta-1.61-1 [INFO] extracting crate ndk-context 0.1.0 into /workspace/builds/worker-2/source [INFO] validating manifest of crates.io crate ndk-context 0.1.0 on toolchain 1.60.0 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+1.60.0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate ndk-context 0.1.0 [INFO] finished tweaking crates.io crate ndk-context 0.1.0 [INFO] tweaked toml for crates.io crate ndk-context 0.1.0 written to /workspace/builds/worker-2/source/Cargo.toml [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+1.60.0" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+1.60.0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+1.60.0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 68e4d34fa6bfca4cb5939ed54761490114189d46d9dc256f34c4ab87a5aae6b7 [INFO] running `Command { std: "docker" "start" "-a" "68e4d34fa6bfca4cb5939ed54761490114189d46d9dc256f34c4ab87a5aae6b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "68e4d34fa6bfca4cb5939ed54761490114189d46d9dc256f34c4ab87a5aae6b7", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "68e4d34fa6bfca4cb5939ed54761490114189d46d9dc256f34c4ab87a5aae6b7", kill_on_drop: false }` [INFO] [stdout] 68e4d34fa6bfca4cb5939ed54761490114189d46d9dc256f34c4ab87a5aae6b7 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+1.60.0" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b8fadcbbedd9091dea7a6d0fa17f21be325d6e191f0e1a6736fde99011d7e870 [INFO] running `Command { std: "docker" "start" "-a" "b8fadcbbedd9091dea7a6d0fa17f21be325d6e191f0e1a6736fde99011d7e870", kill_on_drop: false }` [INFO] [stderr] Compiling ndk-context v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.80s [INFO] running `Command { std: "docker" "inspect" "b8fadcbbedd9091dea7a6d0fa17f21be325d6e191f0e1a6736fde99011d7e870", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b8fadcbbedd9091dea7a6d0fa17f21be325d6e191f0e1a6736fde99011d7e870", kill_on_drop: false }` [INFO] [stdout] b8fadcbbedd9091dea7a6d0fa17f21be325d6e191f0e1a6736fde99011d7e870 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+1.60.0" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 71e2863528ce43fb81700aeaacc6eee49408003e337e9327ad6be2f9926acedc [INFO] running `Command { std: "docker" "start" "-a" "71e2863528ce43fb81700aeaacc6eee49408003e337e9327ad6be2f9926acedc", kill_on_drop: false }` [INFO] [stderr] Compiling ndk-context v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 0.32s [INFO] running `Command { std: "docker" "inspect" "71e2863528ce43fb81700aeaacc6eee49408003e337e9327ad6be2f9926acedc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "71e2863528ce43fb81700aeaacc6eee49408003e337e9327ad6be2f9926acedc", kill_on_drop: false }` [INFO] [stdout] 71e2863528ce43fb81700aeaacc6eee49408003e337e9327ad6be2f9926acedc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+1.60.0" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] c27bf328feda76ac6d7f9d26765f67bfa93e9a552f0276736c25f362ca5c040d [INFO] running `Command { std: "docker" "start" "-a" "c27bf328feda76ac6d7f9d26765f67bfa93e9a552f0276736c25f362ca5c040d", kill_on_drop: false }` [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 0.00s [INFO] [stderr] Running unittests (/opt/rustwide/target/debug/deps/ndk_context-fd28041b643b35c5) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Doc-tests ndk-context [INFO] [stdout] [INFO] [stdout] running 3 tests [INFO] [stdout] test src/lib.rs - (line 6) - compile ... FAILED [INFO] [stdout] test src/lib.rs - AndroidContext::vm (line 37) - compile ... FAILED [INFO] [stdout] test src/lib.rs - AndroidContext::context (line 50) - compile ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- src/lib.rs - (line 6) stdout ---- [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `jni` [INFO] [stdout] --> src/lib.rs:8:19 [INFO] [stdout] | [INFO] [stdout] 5 | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] | ^^^ use of undeclared crate or module `jni` [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `jni` [INFO] [stdout] --> src/lib.rs:14:26 [INFO] [stdout] | [INFO] [stdout] 11 | ctx.context() as jni::sys::jobject, [INFO] [stdout] | ^^^ use of undeclared crate or module `jni` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:8:59 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_6_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_6_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:10:58 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_6_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] 7 | | let class_ctx = env.find_class("android/content/Context")?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_6_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:11:91 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_6_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] 7 | | let class_ctx = env.find_class("android/content/Context")?; [INFO] [stdout] 8 | | let audio_service = env.get_static_field(class_ctx, "AUDIO_SERVICE", "Ljava/lang/String;")?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_6_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:18:6 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_6_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] ... | [INFO] [stdout] 15 | | )? [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_6_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_6_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_6_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0433. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - AndroidContext::vm (line 37) stdout ---- [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `jni` [INFO] [stdout] --> src/lib.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 5 | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] | ^^^ use of undeclared crate or module `jni` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:39:59 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_37_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] 7 | | } _doctest_main_src_lib_rs_37_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0433. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/lib.rs - AndroidContext::context (line 50) stdout ---- [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `jni` [INFO] [stdout] --> src/lib.rs:52:19 [INFO] [stdout] | [INFO] [stdout] 5 | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] | ^^^ use of undeclared crate or module `jni` [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `jni` [INFO] [stdout] --> src/lib.rs:58:26 [INFO] [stdout] | [INFO] [stdout] 11 | ctx.context() as jni::sys::jobject, [INFO] [stdout] | ^^^ use of undeclared crate or module `jni` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:52:59 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_50_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_50_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:54:58 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_50_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] 7 | | let class_ctx = env.find_class("android/content/Context")?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_50_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:55:91 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_50_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] 7 | | let class_ctx = env.find_class("android/content/Context")?; [INFO] [stdout] 8 | | let audio_service = env.get_static_field(class_ctx, "AUDIO_SERVICE", "Ljava/lang/String;")?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_50_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:62:6 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_50_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] ... | [INFO] [stdout] 15 | | )? [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_50_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/lib.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_50_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | let ctx = ndk_context::android_context(); [INFO] [stdout] 5 | | let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?; [INFO] [stdout] 6 | | let env = vm.attach_current_thread(); [INFO] [stdout] ... | [INFO] [stdout] 16 | | .l()?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 17 | | } _doctest_main_src_lib_rs_50_0() } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `FromResidual<_>` is not implemented for `()` [INFO] [stdout] [INFO] [stdout] error: aborting due to 7 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0433. [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] src/lib.rs - (line 6) [INFO] [stdout] src/lib.rs - AndroidContext::context (line 50) [INFO] [stdout] src/lib.rs - AndroidContext::vm (line 37) [INFO] [stdout] [INFO] [stdout] test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.06s [INFO] [stdout] [INFO] [stderr] error: test failed, to rerun pass '--doc' [INFO] running `Command { std: "docker" "inspect" "c27bf328feda76ac6d7f9d26765f67bfa93e9a552f0276736c25f362ca5c040d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c27bf328feda76ac6d7f9d26765f67bfa93e9a552f0276736c25f362ca5c040d", kill_on_drop: false }` [INFO] [stdout] c27bf328feda76ac6d7f9d26765f67bfa93e9a552f0276736c25f362ca5c040d