[INFO] crate piz 0.1.0 is already in cache [INFO] testing piz-0.1.0 against beta-2020-07-24 for beta-1.46-1 [INFO] extracting crate piz 0.1.0 into /workspace/builds/worker-0/source [INFO] validating manifest of crates.io crate piz 0.1.0 on toolchain beta-2020-07-24 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta-2020-07-24" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking crates.io crate piz 0.1.0 [INFO] finished tweaking crates.io crate piz 0.1.0 [INFO] tweaked toml for crates.io crate piz 0.1.0 written to /workspace/builds/worker-0/source/Cargo.toml [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta-2020-07-24" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta-2020-07-24" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/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" "MAP_USER_ID=0" "-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" "--network" "none" "rustops/crates-build-env@sha256:a636fd89d022f18117e1dc8fb37a0a009933cdbbe082814857f0e2024962d47c" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2020-07-24" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c6459a2c1569dc81c4cbd0442052935a2eeacee89d3f3ecba664800594b6d40e [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "c6459a2c1569dc81c4cbd0442052935a2eeacee89d3f3ecba664800594b6d40e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c6459a2c1569dc81c4cbd0442052935a2eeacee89d3f3ecba664800594b6d40e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c6459a2c1569dc81c4cbd0442052935a2eeacee89d3f3ecba664800594b6d40e", kill_on_drop: false }` [INFO] [stdout] c6459a2c1569dc81c4cbd0442052935a2eeacee89d3f3ecba664800594b6d40e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/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" "MAP_USER_ID=0" "-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" "--network" "none" "rustops/crates-build-env@sha256:a636fd89d022f18117e1dc8fb37a0a009933cdbbe082814857f0e2024962d47c" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2020-07-24" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e78d943d87ae69cdf664773470060a3b3d777341e9b69f1980a310f5b4c37756 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "e78d943d87ae69cdf664773470060a3b3d777341e9b69f1980a310f5b4c37756", kill_on_drop: false }` [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling byteorder v1.3.4 [INFO] [stderr] Compiling serde v1.0.114 [INFO] [stderr] Compiling ryu v1.0.5 [INFO] [stderr] Compiling proc-macro2 v1.0.19 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling syn v1.0.37 [INFO] [stderr] Compiling itoa v0.4.6 [INFO] [stderr] Compiling cfg-if v0.1.10 [INFO] [stderr] Compiling crc32fast v1.2.0 [INFO] [stderr] Compiling libc v0.2.74 [INFO] [stderr] Compiling log v0.4.11 [INFO] [stderr] Compiling adler v0.2.3 [INFO] [stderr] Compiling unchecked-index v0.2.2 [INFO] [stderr] Compiling miniz_oxide v0.4.0 [INFO] [stderr] Compiling regex-automata v0.1.9 [INFO] [stderr] Compiling csv-core v0.1.10 [INFO] [stderr] Compiling twoway v0.2.1 [INFO] [stderr] Compiling flate2 v1.0.16 [INFO] [stderr] Compiling quote v1.0.7 [INFO] [stderr] Compiling thiserror-impl v1.0.20 [INFO] [stderr] Compiling bstr v0.2.13 [INFO] [stderr] Compiling thiserror v1.0.20 [INFO] [stderr] Compiling csv v1.1.3 [INFO] [stderr] Compiling codepage-437 v0.1.0 [INFO] [stderr] Compiling piz v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 31.74s [INFO] running `Command { std: "docker" "inspect" "e78d943d87ae69cdf664773470060a3b3d777341e9b69f1980a310f5b4c37756", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e78d943d87ae69cdf664773470060a3b3d777341e9b69f1980a310f5b4c37756", kill_on_drop: false }` [INFO] [stdout] e78d943d87ae69cdf664773470060a3b3d777341e9b69f1980a310f5b4c37756 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/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" "MAP_USER_ID=0" "-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" "--network" "none" "rustops/crates-build-env@sha256:a636fd89d022f18117e1dc8fb37a0a009933cdbbe082814857f0e2024962d47c" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2020-07-24" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b74750cc7bd3b3f377be4a9f6f9677fb1a680572ed4f865891dd74e205c365fc [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "b74750cc7bd3b3f377be4a9f6f9677fb1a680572ed4f865891dd74e205c365fc", kill_on_drop: false }` [INFO] [stderr] Compiling piz v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 1.22s [INFO] running `Command { std: "docker" "inspect" "b74750cc7bd3b3f377be4a9f6f9677fb1a680572ed4f865891dd74e205c365fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b74750cc7bd3b3f377be4a9f6f9677fb1a680572ed4f865891dd74e205c365fc", kill_on_drop: false }` [INFO] [stdout] b74750cc7bd3b3f377be4a9f6f9677fb1a680572ed4f865891dd74e205c365fc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/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" "MAP_USER_ID=0" "-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" "--network" "none" "rustops/crates-build-env@sha256:a636fd89d022f18117e1dc8fb37a0a009933cdbbe082814857f0e2024962d47c" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2020-07-24" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 853b71dbcbd95c2754aa23bf1966f963dc2318238c61dfbc29fc31127fe24168 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "853b71dbcbd95c2754aa23bf1966f963dc2318238c61dfbc29fc31127fe24168", kill_on_drop: false }` [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 0.07s [INFO] [stderr] Running /opt/rustwide/target/debug/deps/piz-66376d4f05f95892 [INFO] [stdout] [INFO] [stdout] running 4 tests [INFO] [stdout] test crc_reader::test::test_empty_reader ... ok [INFO] [stdout] test crc_reader::test::test_byte_by_byte ... ok [INFO] [stdout] test crc_reader::test::test_zero_read ... ok [INFO] [stdout] test tests::there_are_four_lights ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out [INFO] [stdout] [INFO] [stderr] Doc-tests piz [INFO] [stdout] [INFO] [stdout] running 3 tests [INFO] [stdout] test src/read.rs - read::ZipArchive::new (line 94) ... FAILED [INFO] [stdout] test src/lib.rs - (line 4) ... FAILED [INFO] [stdout] test src/read.rs - read::ZipArchive::new (line 88) ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- src/read.rs - read::ZipArchive::new (line 94) stdout ---- [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `Mmap` [INFO] [stdout] --> src/read.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 4 | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] | ^^^^ use of undeclared type or module `Mmap` [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `File` [INFO] [stdout] --> src/read.rs:95:16 [INFO] [stdout] | [INFO] [stdout] 3 | let zip_file = File::open("foo.zip")?; [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 | use std::fs::File; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `ZipArchive` [INFO] [stdout] --> src/read.rs:97:15 [INFO] [stdout] | [INFO] [stdout] 5 | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 | use piz::ZipArchive; [INFO] [stdout] | [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 `std::ops::Try`) [INFO] [stdout] --> src/read.rs:95:16 [INFO] [stdout] | [INFO] [stdout] 2 | / fn main() { [INFO] [stdout] 3 | | let zip_file = File::open("foo.zip")?; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 4 | | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] 5 | | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] 6 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [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 `std::ops::Try`) [INFO] [stdout] --> src/read.rs:96:24 [INFO] [stdout] | [INFO] [stdout] 2 | / fn main() { [INFO] [stdout] 3 | | let zip_file = File::open("foo.zip")?; [INFO] [stdout] 4 | | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 5 | | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] 6 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [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 `std::ops::Try`) [INFO] [stdout] --> src/read.rs:97:15 [INFO] [stdout] | [INFO] [stdout] 2 | / fn main() { [INFO] [stdout] 3 | | let zip_file = File::open("foo.zip")?; [INFO] [stdout] 4 | | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] 5 | | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 6 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [INFO] [stdout] [INFO] [stdout] error: aborting due to 6 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 - (line 4) stdout ---- [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `Mmap` [INFO] [stdout] --> src/lib.rs:12:24 [INFO] [stdout] | [INFO] [stdout] 10 | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] | ^^^^ use of undeclared type or module `Mmap` [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `File` [INFO] [stdout] --> src/lib.rs:11:16 [INFO] [stdout] | [INFO] [stdout] 9 | let zip_file = File::open("foo.zip")?; [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 8 | use std::fs::File; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `ZipArchive` [INFO] [stdout] --> src/lib.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 11 | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 8 | use piz::ZipArchive; [INFO] [stdout] | [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 `std::ops::Try`) [INFO] [stdout] --> src/lib.rs:11:16 [INFO] [stdout] | [INFO] [stdout] 8 | / fn main() { [INFO] [stdout] 9 | | let zip_file = File::open("foo.zip")?; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 10 | | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] 11 | | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] ... | [INFO] [stdout] 23 | | // } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [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 `std::ops::Try`) [INFO] [stdout] --> src/lib.rs:12:24 [INFO] [stdout] | [INFO] [stdout] 8 | / fn main() { [INFO] [stdout] 9 | | let zip_file = File::open("foo.zip")?; [INFO] [stdout] 10 | | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 11 | | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] ... | [INFO] [stdout] 23 | | // } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [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 `std::ops::Try`) [INFO] [stdout] --> src/lib.rs:13:15 [INFO] [stdout] | [INFO] [stdout] 8 | / fn main() { [INFO] [stdout] 9 | | let zip_file = File::open("foo.zip")?; [INFO] [stdout] 10 | | let mapping = unsafe { Mmap::map(&zip_file)? }; [INFO] [stdout] 11 | | let archive = ZipArchive::new(&mapping)?; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] ... | [INFO] [stdout] 23 | | // } [INFO] [stdout] 24 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a closure that returns `Result` or `Option` (or another type that implements `std::ops::Try`) [INFO] [stdout] --> src/lib.rs:17:22 [INFO] [stdout] | [INFO] [stdout] 14 | archive.entries().into_par_iter().try_for_each(|entry| { [INFO] [stdout] | ________________________________________________- [INFO] [stdout] 15 | | let mut reader = archive.read(entry)?; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a closure that returns `()` [INFO] [stdout] 16 | | // reader implements Read, so read away! [INFO] [stdout] 17 | | }); [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [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/read.rs - read::ZipArchive::new (line 88) stdout ---- [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `fs` [INFO] [stdout] --> src/read.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 3 | let bytes = fs::read("foo.zip")?; [INFO] [stdout] | ^^ use of undeclared type or module `fs` [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type or module `ZipArchive` [INFO] [stdout] --> src/read.rs:90:15 [INFO] [stdout] | [INFO] [stdout] 4 | let archive = ZipArchive::new(&bytes)?; [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 | use piz::ZipArchive; [INFO] [stdout] | [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 `std::ops::Try`) [INFO] [stdout] --> src/read.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 2 | / fn main() { [INFO] [stdout] 3 | | let bytes = fs::read("foo.zip")?; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 4 | | let archive = ZipArchive::new(&bytes)?; [INFO] [stdout] 5 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [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 `std::ops::Try`) [INFO] [stdout] --> src/read.rs:90:15 [INFO] [stdout] | [INFO] [stdout] 2 | / fn main() { [INFO] [stdout] 3 | | let bytes = fs::read("foo.zip")?; [INFO] [stdout] 4 | | let archive = ZipArchive::new(&bytes)?; [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] 5 | | } [INFO] [stdout] | |_- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::ops::Try` is not implemented for `()` [INFO] [stdout] = note: required by `std::ops::Try::from_error` [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 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 4) [INFO] [stdout] src/read.rs - read::ZipArchive::new (line 88) [INFO] [stdout] src/read.rs - read::ZipArchive::new (line 94) [INFO] [stdout] [INFO] [stdout] test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out [INFO] [stdout] [INFO] [stderr] error: test failed, to rerun pass '--doc' [INFO] running `Command { std: "docker" "inspect" "853b71dbcbd95c2754aa23bf1966f963dc2318238c61dfbc29fc31127fe24168", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "853b71dbcbd95c2754aa23bf1966f963dc2318238c61dfbc29fc31127fe24168", kill_on_drop: false }` [INFO] [stdout] 853b71dbcbd95c2754aa23bf1966f963dc2318238c61dfbc29fc31127fe24168