[INFO] cloning repository https://github.com/cptrodgers/simple-aws-s3 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cptrodgers/simple-aws-s3" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcptrodgers%2Fsimple-aws-s3", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcptrodgers%2Fsimple-aws-s3'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6e0a336d15f51dc957a0f023aaadd56b50844cfc [INFO] testing cptrodgers/simple-aws-s3 against master#432e145bd5a974c5b6f4dd9b352891bd7502b69d for pr-87041 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcptrodgers%2Fsimple-aws-s3" "/workspace/builds/worker-12/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-12/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/cptrodgers/simple-aws-s3 on toolchain 432e145bd5a974c5b6f4dd9b352891bd7502b69d [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/cptrodgers/simple-aws-s3 [INFO] removed 0 missing examples [INFO] finished tweaking git repo https://github.com/cptrodgers/simple-aws-s3 [INFO] tweaked toml for git repo https://github.com/cptrodgers/simple-aws-s3 written to /workspace/builds/worker-12/source/Cargo.toml [INFO] crate git repo https://github.com/cptrodgers/simple-aws-s3 already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 05e2f04c8dcd21bdb3bd4de78f0aff00f5250d9b51f2737f91b91c596a66de05 [INFO] running `Command { std: "docker" "start" "-a" "05e2f04c8dcd21bdb3bd4de78f0aff00f5250d9b51f2737f91b91c596a66de05", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "05e2f04c8dcd21bdb3bd4de78f0aff00f5250d9b51f2737f91b91c596a66de05", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "05e2f04c8dcd21bdb3bd4de78f0aff00f5250d9b51f2737f91b91c596a66de05", kill_on_drop: false }` [INFO] [stdout] 05e2f04c8dcd21bdb3bd4de78f0aff00f5250d9b51f2737f91b91c596a66de05 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/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=forbid" "-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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4c5882c56f3b82a0dd537012026c9f3a94bed57fc56c202d02be57b8c68d64ab [INFO] running `Command { std: "docker" "start" "-a" "4c5882c56f3b82a0dd537012026c9f3a94bed57fc56c202d02be57b8c68d64ab", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling proc-macro2 v1.0.27 [INFO] [stderr] Compiling libc v0.2.95 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling syn v1.0.72 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling version_check v0.9.3 [INFO] [stderr] Compiling futures-core v0.3.15 [INFO] [stderr] Compiling slab v0.4.3 [INFO] [stderr] Compiling fnv v1.0.7 [INFO] [stderr] Compiling memchr v2.4.0 [INFO] [stderr] Compiling typenum v1.13.0 [INFO] [stderr] Compiling futures-task v0.3.15 [INFO] [stderr] Compiling serde_derive v1.0.126 [INFO] [stderr] Compiling pin-project-lite v0.1.12 [INFO] [stderr] Compiling pin-project-lite v0.2.6 [INFO] [stderr] Compiling futures-channel v0.3.15 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Compiling httparse v1.4.1 [INFO] [stderr] Compiling once_cell v1.7.2 [INFO] [stderr] Compiling hashbrown v0.9.1 [INFO] [stderr] Compiling openssl-probe v0.1.4 [INFO] [stderr] Compiling serde_json v1.0.64 [INFO] [stderr] Compiling mime v0.3.16 [INFO] [stderr] Compiling cpufeatures v0.1.4 [INFO] [stderr] Compiling tracing-core v0.1.18 [INFO] [stderr] Compiling unicode-bidi v0.3.5 [INFO] [stderr] Compiling tinyvec v1.2.0 [INFO] [stderr] Compiling form_urlencoded v1.0.1 [INFO] [stderr] Compiling http v0.2.4 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling encoding_rs v0.8.28 [INFO] [stderr] Compiling tracing v0.1.26 [INFO] [stderr] Compiling want v0.3.0 [INFO] [stderr] Compiling openssl-sys v0.9.63 [INFO] [stderr] Compiling futures-util v0.3.15 [INFO] [stderr] Compiling indexmap v1.6.2 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling num-integer v0.1.44 [INFO] [stderr] Compiling iovec v0.1.4 [INFO] [stderr] Compiling net2 v0.2.37 [INFO] [stderr] Compiling num_cpus v1.13.0 [INFO] [stderr] Compiling signal-hook-registry v1.4.0 [INFO] [stderr] Compiling socket2 v0.3.19 [INFO] [stderr] Compiling time v0.1.44 [INFO] [stderr] Compiling generic-array v0.14.4 [INFO] [stderr] Compiling unicase v2.6.0 [INFO] [stderr] Compiling unicode-normalization v0.1.18 [INFO] [stderr] Compiling mio v0.6.23 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Compiling mime_guess v2.0.3 [INFO] [stderr] Compiling idna v0.2.3 [INFO] [stderr] Compiling mio-uds v0.6.8 [INFO] [stderr] Compiling http-body v0.3.1 [INFO] [stderr] Compiling openssl v0.10.34 [INFO] [stderr] Compiling native-tls v0.2.7 [INFO] [stderr] Compiling digest v0.9.0 [INFO] [stderr] Compiling block-buffer v0.9.0 [INFO] [stderr] Compiling crypto-mac v0.11.0 [INFO] [stderr] Compiling url v2.2.2 [INFO] [stderr] Compiling hmac v0.11.0 [INFO] [stderr] Compiling sha2 v0.9.5 [INFO] [stderr] Compiling chrono v0.4.19 [INFO] [stderr] Compiling tokio-macros v0.2.6 [INFO] [stderr] Compiling pin-project-internal v1.0.7 [INFO] [stderr] Compiling thiserror-impl v1.0.25 [INFO] [stderr] Compiling tokio v0.2.25 [INFO] [stderr] Compiling thiserror v1.0.25 [INFO] [stderr] Compiling pin-project v1.0.7 [INFO] [stderr] Compiling tracing-futures v0.2.5 [INFO] [stderr] Compiling serde v1.0.126 [INFO] [stderr] Compiling tokio-util v0.3.1 [INFO] [stderr] Compiling tokio-tls v0.3.1 [INFO] [stderr] Compiling h2 v0.2.7 [INFO] [stderr] Compiling serde_urlencoded v0.7.0 [INFO] [stderr] Compiling serde-xml-rs v0.4.1 [INFO] [stderr] Compiling hyper v0.13.10 [INFO] [stderr] Compiling hyper-tls v0.4.3 [INFO] [stderr] Compiling reqwest v0.10.10 [INFO] [stderr] Compiling simple-aws-s3 v0.2.2-alpha.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 34.63s [INFO] running `Command { std: "docker" "inspect" "4c5882c56f3b82a0dd537012026c9f3a94bed57fc56c202d02be57b8c68d64ab", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4c5882c56f3b82a0dd537012026c9f3a94bed57fc56c202d02be57b8c68d64ab", kill_on_drop: false }` [INFO] [stdout] 4c5882c56f3b82a0dd537012026c9f3a94bed57fc56c202d02be57b8c68d64ab [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/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=forbid" "-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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b2cb3920d395d58f03d80655142c9cbef78b3248c8ef1eabc6f8fc2ea87eb268 [INFO] running `Command { std: "docker" "start" "-a" "b2cb3920d395d58f03d80655142c9cbef78b3248c8ef1eabc6f8fc2ea87eb268", kill_on_drop: false }` [INFO] [stderr] Compiling simple-aws-s3 v0.2.2-alpha.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 2.39s [INFO] running `Command { std: "docker" "inspect" "b2cb3920d395d58f03d80655142c9cbef78b3248c8ef1eabc6f8fc2ea87eb268", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b2cb3920d395d58f03d80655142c9cbef78b3248c8ef1eabc6f8fc2ea87eb268", kill_on_drop: false }` [INFO] [stdout] b2cb3920d395d58f03d80655142c9cbef78b3248c8ef1eabc6f8fc2ea87eb268 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-12/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=forbid" "-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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+432e145bd5a974c5b6f4dd9b352891bd7502b69d" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 34edfeae8a98036fece2a5dc1ce185c17a3bc1214ae37221586e84079fa8109b [INFO] running `Command { std: "docker" "start" "-a" "34edfeae8a98036fece2a5dc1ce185c17a3bc1214ae37221586e84079fa8109b", kill_on_drop: false }` [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 0.06s [INFO] [stderr] Running unittests (/opt/rustwide/target/debug/deps/simple_aws_s3-d809a0d911196c20) [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 simple_aws_s3 [INFO] [stdout] [INFO] [stdout] running 4 tests [INFO] [stdout] test src/lib.rs - (line 70) ... ok [INFO] [stdout] test src/lib.rs - (line 32) ... FAILED [INFO] [stdout] test src/s3.rs - s3::S3 (line 20) ... FAILED [INFO] [stdout] test src/s3_signer.rs - s3_signer::Signer (line 13) ... ok [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- src/lib.rs - (line 32) stdout ---- [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `StatusCode` [INFO] [stdout] --> src/lib.rs:58:26 [INFO] [stdout] | [INFO] [stdout] 28 | assert_eq!(res.status(), StatusCode::NO_CONTENT); [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `StatusCode` [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `StatusCode` [INFO] [stdout] --> src/lib.rs:67:26 [INFO] [stdout] | [INFO] [stdout] 37 | assert_eq!(res.status(), StatusCode::OK); [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `StatusCode` [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `s3` in this scope [INFO] [stdout] --> src/lib.rs:37:48 [INFO] [stdout] | [INFO] [stdout] 7 | let PostPresignedInfo { upload_url, params } = s3 [INFO] [stdout] | ^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Duration` [INFO] [stdout] --> src/lib.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 12 | Duration::seconds(3600), [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing one of these items [INFO] [stdout] | [INFO] [stdout] 2 | use chrono::Duration; [INFO] [stdout] | [INFO] [stdout] 2 | use core::time::Duration; [INFO] [stdout] | [INFO] [stdout] 2 | use std::time::Duration; [INFO] [stdout] | [INFO] [stdout] 2 | use tokio::time::Duration; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PostPresignedInfo` in this scope [INFO] [stdout] --> src/lib.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 7 | let PostPresignedInfo { upload_url, params } = s3 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 | use simple_aws_s3::PostPresignedInfo; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Form` [INFO] [stdout] --> src/lib.rs:46:16 [INFO] [stdout] | [INFO] [stdout] 16 | let mut form = Form::new(); [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 | use reqwest::multipart::Form; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Part` [INFO] [stdout] --> src/lib.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 20 | let part = Part::text(content).mime_str("plain/text").unwrap(); [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing one of these items [INFO] [stdout] | [INFO] [stdout] 2 | use core::num::fmt::Part; [INFO] [stdout] | [INFO] [stdout] 2 | use reqwest::multipart::Part; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `s3` in this scope [INFO] [stdout] --> src/lib.rs:61:20 [INFO] [stdout] | [INFO] [stdout] 31 | let download_url = s3.generate_presigned_get(&key, 3600).unwrap(); [INFO] [stdout] | ^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/lib.rs:52:11 [INFO] [stdout] | [INFO] [stdout] 2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_32_0() { [INFO] [stdout] | ----------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 22 | let res = reqwest::Client::new() [INFO] [stdout] | ___________^ [INFO] [stdout] 23 | | .post(&upload_url) [INFO] [stdout] 24 | | .multipart(form) [INFO] [stdout] 25 | | .send() [INFO] [stdout] 26 | | .await [INFO] [stdout] | |__________^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/lib.rs:62:11 [INFO] [stdout] | [INFO] [stdout] 2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_32_0() { [INFO] [stdout] | ----------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 32 | let res = reqwest::Client::new() [INFO] [stdout] | ___________^ [INFO] [stdout] 33 | | .get(&download_url) [INFO] [stdout] 34 | | .send() [INFO] [stdout] 35 | | .await [INFO] [stdout] | |__________^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/lib.rs:68:12 [INFO] [stdout] | [INFO] [stdout] 2 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_32_0() { [INFO] [stdout] | ----------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 38 | assert_eq!(res.text().await.unwrap(), content); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error: aborting due to 11 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0422, E0425, E0433, E0728. [INFO] [stdout] For more information about an error, try `rustc --explain E0422`. [INFO] [stdout] Couldn't compile the test. [INFO] [stdout] ---- src/s3.rs - s3::S3 (line 20) stdout ---- [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/s3.rs:51:16 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_s3_rs_20_0() { [INFO] [stdout] | ---------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 34 | let head_req = s3.head_object("example.png").await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks [INFO] [stdout] [INFO] [stdout] error[E0728]: `await` is only allowed inside `async` functions and blocks [INFO] [stdout] --> src/s3.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_s3_rs_20_0() { [INFO] [stdout] | ---------------------------- this is not `async` [INFO] [stdout] ... [INFO] [stdout] 37 | let delete_req = s3.delete_object("example.png").await?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks [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/s3.rs:51:51 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_s3_rs_20_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | use simple_aws_s3::*; [INFO] [stdout] 5 | | use chrono::Duration; [INFO] [stdout] 6 | | [INFO] [stdout] ... | [INFO] [stdout] 34 | | let head_req = s3.head_object("example.png").await?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] ... | [INFO] [stdout] 37 | | let delete_req = s3.delete_object("example.png").await?; [INFO] [stdout] 38 | | } _doctest_main_src_s3_rs_20_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] = note: required by `from_residual` [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/s3.rs:54:55 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_s3_rs_20_0() { [INFO] [stdout] | ______________________________________- [INFO] [stdout] 4 | | use simple_aws_s3::*; [INFO] [stdout] 5 | | use chrono::Duration; [INFO] [stdout] 6 | | [INFO] [stdout] ... | [INFO] [stdout] 37 | | let delete_req = s3.delete_object("example.png").await?; [INFO] [stdout] | | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 38 | | } _doctest_main_src_s3_rs_20_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] = note: required by `from_residual` [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0728. [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 32) [INFO] [stdout] src/s3.rs - s3::S3 (line 20) [INFO] [stdout] [INFO] [stdout] test result: FAILED. 2 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.77s [INFO] [stdout] [INFO] [stderr] error: test failed, to rerun pass '--doc' [INFO] running `Command { std: "docker" "inspect" "34edfeae8a98036fece2a5dc1ce185c17a3bc1214ae37221586e84079fa8109b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "34edfeae8a98036fece2a5dc1ce185c17a3bc1214ae37221586e84079fa8109b", kill_on_drop: false }` [INFO] [stdout] 34edfeae8a98036fece2a5dc1ce185c17a3bc1214ae37221586e84079fa8109b