[INFO] fetching crate quantizr 1.4.3... [INFO] testing quantizr-1.4.3 against master#c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38 for pr-146098-8 [INFO] extracting crate quantizr 1.4.3 into /workspace/builds/worker-3-tc1/source [INFO] started tweaking crates.io crate quantizr 1.4.3 [INFO] finished tweaking crates.io crate quantizr 1.4.3 [INFO] tweaked toml for crates.io crate quantizr 1.4.3 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate quantizr 1.4.3 on toolchain c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate quantizr 1.4.3 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a50f7ef48cf1e6dce5a21fcede4fa739177a7b1defd79d7a1ec9dc0886e23593 [INFO] running `Command { std: "docker" "start" "-a" "a50f7ef48cf1e6dce5a21fcede4fa739177a7b1defd79d7a1ec9dc0886e23593", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a50f7ef48cf1e6dce5a21fcede4fa739177a7b1defd79d7a1ec9dc0886e23593", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a50f7ef48cf1e6dce5a21fcede4fa739177a7b1defd79d7a1ec9dc0886e23593", kill_on_drop: false }` [INFO] [stdout] a50f7ef48cf1e6dce5a21fcede4fa739177a7b1defd79d7a1ec9dc0886e23593 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/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" "RUSTDOCFLAGS=--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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e6b8792d9d758ed8d1a8feaed96a03c685fddc7f295eefe27373bab4d9700256 [INFO] running `Command { std: "docker" "start" "-a" "e6b8792d9d758ed8d1a8feaed96a03c685fddc7f295eefe27373bab4d9700256", kill_on_drop: false }` [INFO] [stderr] Compiling quantizr v1.4.3 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.71s [INFO] running `Command { std: "docker" "inspect" "e6b8792d9d758ed8d1a8feaed96a03c685fddc7f295eefe27373bab4d9700256", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e6b8792d9d758ed8d1a8feaed96a03c685fddc7f295eefe27373bab4d9700256", kill_on_drop: false }` [INFO] [stdout] e6b8792d9d758ed8d1a8feaed96a03c685fddc7f295eefe27373bab4d9700256 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/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" "RUSTDOCFLAGS=--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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 3be98ab9239e223cffa9e5a888f6b133f43caad63425f043cfee2ac4b7954c06 [INFO] running `Command { std: "docker" "start" "-a" "3be98ab9239e223cffa9e5a888f6b133f43caad63425f043cfee2ac4b7954c06", kill_on_drop: false }` [INFO] [stderr] Compiling quantizr v1.4.3 (/opt/rustwide/workdir) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.34s [INFO] running `Command { std: "docker" "inspect" "3be98ab9239e223cffa9e5a888f6b133f43caad63425f043cfee2ac4b7954c06", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3be98ab9239e223cffa9e5a888f6b133f43caad63425f043cfee2ac4b7954c06", kill_on_drop: false }` [INFO] [stdout] 3be98ab9239e223cffa9e5a888f6b133f43caad63425f043cfee2ac4b7954c06 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/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" "RUSTDOCFLAGS=--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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 571fbb9f249702eefa45dd8cecd1435d545ac0eab17c7b25cb9c7bd6d963e72b [INFO] running `Command { std: "docker" "start" "-a" "571fbb9f249702eefa45dd8cecd1435d545ac0eab17c7b25cb9c7bd6d963e72b", kill_on_drop: false }` [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.02s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/quantizr-1845a5520dd3754a) [INFO] [stderr] Doc-tests quantizr [INFO] [stdout] [INFO] [stdout] running 4 tests [INFO] [stdout] test ord_float::tests::test_ordfloat32_ge ... ok [INFO] [stdout] test ord_float::tests::test_ordfloat32_le ... ok [INFO] [stdout] test ord_float::tests::test_ordfloat32_lt ... ok [INFO] [stdout] test ord_float::tests::test_ordfloat32_gt ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] running 2 tests [INFO] [stdout] test src/lib.rs - (line 28) ... FAILED [INFO] [stdout] test src/lib.rs - (line 5) ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- src/lib.rs - (line 28) stdout ---- [INFO] [stdout] error[E0425]: cannot find value `width` in this scope [INFO] [stdout] --> src/lib.rs:46:30 [INFO] [stdout] | [INFO] [stdout] 46 | let mut indexes1 = vec![0u8; width * height]; [INFO] [stdout] | ^^^^^ help: a local variable with a similar name exists: `width1` [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `height` in this scope [INFO] [stdout] --> src/lib.rs:46:38 [INFO] [stdout] | [INFO] [stdout] 46 | let mut indexes1 = vec![0u8; width * height]; [INFO] [stdout] | ^^^^^^ help: a local variable with a similar name exists: `height1` [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `width` in this scope [INFO] [stdout] --> src/lib.rs:49:30 [INFO] [stdout] | [INFO] [stdout] 49 | let mut indexes2 = vec![0u8; width * height]; [INFO] [stdout] | ^^^^^ help: a local variable with a similar name exists: `width1` [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `height` in this scope [INFO] [stdout] --> src/lib.rs:49:38 [INFO] [stdout] | [INFO] [stdout] 49 | let mut indexes2 = vec![0u8; width * height]; [INFO] [stdout] | ^^^^^^ help: a local variable with a similar name exists: `height1` [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `load_image1` in this scope [INFO] [stdout] --> src/lib.rs:32:33 [INFO] [stdout] | [INFO] [stdout] 32 | let (bytes1, width1, height1) = load_image1(); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [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:33:59 [INFO] [stdout] | [INFO] [stdout] 29 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 33 | let image1 = quantizr::Image::new(bytes1, width1, height1)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 29 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() -> Result<(), Box> { [INFO] [stdout] 30 | let mut hist = quantizr::Histogram::new(); [INFO] [stdout] ... [INFO] [stdout] 55 | save_image2(palette, indexes2, width2, height2); [INFO] [stdout] 56 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `load_image2` in this scope [INFO] [stdout] --> src/lib.rs:36:33 [INFO] [stdout] | [INFO] [stdout] 36 | let (bytes2, width2, height2) = load_image2(); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [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:37:59 [INFO] [stdout] | [INFO] [stdout] 29 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 37 | let image2 = quantizr::Image::new(bytes2, width2, height2)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 29 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() -> Result<(), Box> { [INFO] [stdout] 30 | let mut hist = quantizr::Histogram::new(); [INFO] [stdout] ... [INFO] [stdout] 55 | save_image2(palette, indexes2, width2, height2); [INFO] [stdout] 56 + Ok(()) [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 `FromResidual`) [INFO] [stdout] --> src/lib.rs:41:25 [INFO] [stdout] | [INFO] [stdout] 29 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 41 | opts.set_max_colors(256)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 29 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() -> Result<(), Box> { [INFO] [stdout] 30 | let mut hist = quantizr::Histogram::new(); [INFO] [stdout] ... [INFO] [stdout] 55 | save_image2(palette, indexes2, width2, height2); [INFO] [stdout] 56 + Ok(()) [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 `FromResidual`) [INFO] [stdout] --> src/lib.rs:44:32 [INFO] [stdout] | [INFO] [stdout] 29 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 44 | result.set_dithering_level(1.0)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 29 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() -> Result<(), Box> { [INFO] [stdout] 30 | let mut hist = quantizr::Histogram::new(); [INFO] [stdout] ... [INFO] [stdout] 55 | save_image2(palette, indexes2, width2, height2); [INFO] [stdout] 56 + Ok(()) [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 `FromResidual`) [INFO] [stdout] --> src/lib.rs:47:53 [INFO] [stdout] | [INFO] [stdout] 29 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 47 | result.remap_image(&image1, indexes1.as_mut_slice())?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 29 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() -> Result<(), Box> { [INFO] [stdout] 30 | let mut hist = quantizr::Histogram::new(); [INFO] [stdout] ... [INFO] [stdout] 55 | save_image2(palette, indexes2, width2, height2); [INFO] [stdout] 56 + Ok(()) [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 `FromResidual`) [INFO] [stdout] --> src/lib.rs:50:53 [INFO] [stdout] | [INFO] [stdout] 29 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() { [INFO] [stdout] | ---------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 50 | result.remap_image(&image2, indexes2.as_mut_slice())?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 29 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_28_0() -> Result<(), Box> { [INFO] [stdout] 30 | let mut hist = quantizr::Histogram::new(); [INFO] [stdout] ... [INFO] [stdout] 55 | save_image2(palette, indexes2, width2, height2); [INFO] [stdout] 56 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `save_image1` in this scope [INFO] [stdout] --> src/lib.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | save_image1(palette, indexes1, width1, height1); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `save_image2` in this scope [INFO] [stdout] --> src/lib.rs:55:1 [INFO] [stdout] | [INFO] [stdout] 55 | save_image2(palette, indexes2, width2, height2); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error: aborting due to 14 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0425. [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 5) stdout ---- [INFO] [stdout] error[E0425]: cannot find function `load_image` in this scope [INFO] [stdout] --> src/lib.rs:7:30 [INFO] [stdout] | [INFO] [stdout] 7 | let (bytes, width, height) = load_image(); [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [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:9:55 [INFO] [stdout] | [INFO] [stdout] 6 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() { [INFO] [stdout] | --------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 9 | let image = quantizr::Image::new(bytes, width, height)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 6 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() -> Result<(), Box> { [INFO] [stdout] 7 | let (bytes, width, height) = load_image(); [INFO] [stdout] ... [INFO] [stdout] 22 | save_image(palette, indexes, width, height); [INFO] [stdout] 23 + Ok(()) [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 `FromResidual`) [INFO] [stdout] --> src/lib.rs:12:25 [INFO] [stdout] | [INFO] [stdout] 6 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() { [INFO] [stdout] | --------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 12 | opts.set_max_colors(256)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 6 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() -> Result<(), Box> { [INFO] [stdout] 7 | let (bytes, width, height) = load_image(); [INFO] [stdout] ... [INFO] [stdout] 22 | save_image(palette, indexes, width, height); [INFO] [stdout] 23 + Ok(()) [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 `FromResidual`) [INFO] [stdout] --> src/lib.rs:15:32 [INFO] [stdout] | [INFO] [stdout] 6 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() { [INFO] [stdout] | --------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 15 | result.set_dithering_level(1.0)?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 6 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() -> Result<(), Box> { [INFO] [stdout] 7 | let (bytes, width, height) = load_image(); [INFO] [stdout] ... [INFO] [stdout] 22 | save_image(palette, indexes, width, height); [INFO] [stdout] 23 + Ok(()) [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 `FromResidual`) [INFO] [stdout] --> src/lib.rs:18:51 [INFO] [stdout] | [INFO] [stdout] 6 | fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() { [INFO] [stdout] | --------------------------------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 18 | result.remap_image(&image, indexes.as_mut_slice())?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 6 ~ fn main() { #[allow(non_snake_case)] fn _doctest_main_src_lib_rs_5_0() -> Result<(), Box> { [INFO] [stdout] 7 | let (bytes, width, height) = load_image(); [INFO] [stdout] ... [INFO] [stdout] 22 | save_image(palette, indexes, width, height); [INFO] [stdout] 23 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `save_image` in this scope [INFO] [stdout] --> src/lib.rs:22:1 [INFO] [stdout] | [INFO] [stdout] 22 | save_image(palette, indexes, width, height); [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] error: aborting due to 6 previous errors [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0425. [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 28) [INFO] [stdout] src/lib.rs - (line 5) [INFO] [stdout] [INFO] [stdout] test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s [INFO] [stdout] [INFO] [stdout] all doctests ran in 0.19s; merged doctests compilation took 0.09s [INFO] [stderr] error: doctest failed, to rerun pass `--doc` [INFO] running `Command { std: "docker" "inspect" "571fbb9f249702eefa45dd8cecd1435d545ac0eab17c7b25cb9c7bd6d963e72b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "571fbb9f249702eefa45dd8cecd1435d545ac0eab17c7b25cb9c7bd6d963e72b", kill_on_drop: false }` [INFO] [stdout] 571fbb9f249702eefa45dd8cecd1435d545ac0eab17c7b25cb9c7bd6d963e72b