[INFO] fetching crate errgo 0.1.4... [INFO] testing errgo-0.1.4 against master#562dee4820c458d823175268e41601d4c060588a for pr-154210-1 [INFO] extracting crate errgo 0.1.4 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate errgo 0.1.4 [INFO] finished tweaking crates.io crate errgo 0.1.4 [INFO] tweaked toml for crates.io crate errgo 0.1.4 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate errgo 0.1.4 on toolchain 562dee4820c458d823175268e41601d4c060588a [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 37 packages to latest compatible versions [INFO] [stderr] Adding thiserror v1.0.69 (available: v2.0.18) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded target-triple v1.0.0 [INFO] [stderr] Downloaded trybuild v1.0.116 [INFO] [stderr] Downloaded toml v1.1.2+spec-1.1.0 [INFO] [stderr] Downloaded serde_spanned v1.1.1 [INFO] [stderr] Downloaded dissimilar v1.0.11 [INFO] [stderr] Downloaded toml_parser v1.1.2+spec-1.1.0 [INFO] [stderr] Downloaded toml_datetime v1.1.1+spec-1.1.0 [INFO] [stderr] Downloaded toml_writer v1.1.1+spec-1.1.0 [INFO] [stderr] Downloaded winnow v1.0.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c9ea2c7d76702432f9832154c23c5f6855abf2a95fc28d387f297386ef541521 [INFO] running `Command { std: "docker" "start" "-a" "c9ea2c7d76702432f9832154c23c5f6855abf2a95fc28d387f297386ef541521", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c9ea2c7d76702432f9832154c23c5f6855abf2a95fc28d387f297386ef541521", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c9ea2c7d76702432f9832154c23c5f6855abf2a95fc28d387f297386ef541521", kill_on_drop: false }` [INFO] [stdout] c9ea2c7d76702432f9832154c23c5f6855abf2a95fc28d387f297386ef541521 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 21e76f70f2226dc59e9db76a297772786c7a0473a4a720fa973e9d555048720b [INFO] running `Command { std: "docker" "start" "-a" "21e76f70f2226dc59e9db76a297772786c7a0473a4a720fa973e9d555048720b", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling errgo v0.1.4 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 8.94s [INFO] running `Command { std: "docker" "inspect" "21e76f70f2226dc59e9db76a297772786c7a0473a4a720fa973e9d555048720b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "21e76f70f2226dc59e9db76a297772786c7a0473a4a720fa973e9d555048720b", kill_on_drop: false }` [INFO] [stdout] 21e76f70f2226dc59e9db76a297772786c7a0473a4a720fa973e9d555048720b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e2f33c9164e746f089ae1bb4a64aaba5842501c439fdba58a19ecbf2bd6b530c [INFO] running `Command { std: "docker" "start" "-a" "e2f33c9164e746f089ae1bb4a64aaba5842501c439fdba58a19ecbf2bd6b530c", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling target-triple v1.0.0 [INFO] [stderr] Compiling quote v1.0.45 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling winnow v1.0.1 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling toml_writer v1.1.1+spec-1.1.0 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Compiling termcolor v1.4.1 [INFO] [stderr] Compiling dissimilar v1.0.11 [INFO] [stderr] Compiling yansi v1.0.1 [INFO] [stderr] Compiling diff v0.1.13 [INFO] [stderr] Compiling toml_parser v1.1.2+spec-1.1.0 [INFO] [stderr] Compiling pretty_assertions v1.4.1 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling serde_spanned v1.1.1 [INFO] [stderr] Compiling toml_datetime v1.1.1+spec-1.1.0 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Compiling toml v1.1.2+spec-1.1.0 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling errgo v0.1.4 (/opt/rustwide/workdir) [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling trybuild v1.0.116 [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 30.37s [INFO] running `Command { std: "docker" "inspect" "e2f33c9164e746f089ae1bb4a64aaba5842501c439fdba58a19ecbf2bd6b530c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e2f33c9164e746f089ae1bb4a64aaba5842501c439fdba58a19ecbf2bd6b530c", kill_on_drop: false }` [INFO] [stdout] e2f33c9164e746f089ae1bb4a64aaba5842501c439fdba58a19ecbf2bd6b530c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 4717b46b3424b26f4c0d9b04f079a3b5de374ad5ece29be9b5351f85f5d4bb98 [INFO] running `Command { std: "docker" "start" "-a" "4717b46b3424b26f4c0d9b04f079a3b5de374ad5ece29be9b5351f85f5d4bb98", kill_on_drop: false }` [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.13s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/errgo-f38ab903a625ff8c) [INFO] [stdout] [INFO] [stdout] running 14 tests [INFO] [stdout] test config::tests::parse_all ... ok [INFO] [stdout] test config::tests::parse_attributes ... ok [INFO] [stdout] test data::tests::parse_named_variant ... ok [INFO] [stdout] test config::tests::parse_visibility ... ok [INFO] [stdout] test data::tests::parse_unit_variant_with_discriminant ... ok [INFO] [stdout] test config::tests::parse_derives ... ok [INFO] [stdout] test data::tests::parse_unnamed_variant ... ok [INFO] [stdout] test data::tests::use_unit_variant ... ok [INFO] [stdout] test data::tests::use_unnamed_variant ... ok [INFO] [stdout] test data::tests::parse_unit_variant ... ok [INFO] [stdout] test data::tests::use_named_variant ... ok [INFO] [stdout] test tests::get_result_name ... ok [INFO] [stdout] test tests::readme ... FAILED [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling quote v1.0.45 [INFO] [stderr] Compiling unicode-ident v1.0.24 [INFO] [stderr] Compiling version_check v0.9.5 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling diff v0.1.13 [INFO] [stderr] Compiling yansi v1.0.1 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling pretty_assertions v1.4.1 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling errgo v0.1.4 (/opt/rustwide/workdir) [INFO] [stderr] Compiling errgo-tests v0.0.0 (/opt/rustwide/target/tests/trybuild/errgo) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.88s [INFO] [stderr] [INFO] [stderr] [INFO] [stderr] test trybuild/pass/derive_passthrough.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/empty.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/err_attr_passthrough.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/mix.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/nested.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/struct_attr_passthrough.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/structy.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/tuple.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/unit.rs [should pass] ... ok [INFO] [stderr] test trybuild/pass/visibility.rs [should pass] ... ok [INFO] [stderr] [INFO] [stderr] WARNINGS: [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] warning: unused import: `inner::FooError` [INFO] [stderr] --> trybuild/pass/visibility.rs:2:13 [INFO] [stderr] | [INFO] [stderr] 2 | pub use inner::FooError; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] [INFO] [stderr] STDERR: [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] warning: unused import: `inner::FooError` [INFO] [stderr] --> /opt/rustwide/workdir/trybuild/pass/visibility.rs:2:13 [INFO] [stderr] | [INFO] [stderr] 2 | pub use inner::FooError; [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] [INFO] [stderr] test trybuild/fail/invalid_ident.rs [should fail to compile] ... mismatch [INFO] [stderr] [INFO] [stderr] EXPECTED: [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] error: expected identifier [INFO] [stderr] --> trybuild/fail/invalid_ident.rs:5:21 [INFO] [stderr] | [INFO] [stderr] 5 | return Err(err!(1Bar)); [INFO] [stderr] | ^^^^ [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] [INFO] [stderr] ACTUAL OUTPUT: [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] error: expected identifier [INFO] [stderr] --> trybuild/fail/invalid_ident.rs:5:21 [INFO] [stderr] | [INFO] [stderr] 5 | return Err(err!(1Bar)); [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] error: cannot find macro `err` in this scope [INFO] [stderr] --> trybuild/fail/invalid_ident.rs:5:16 [INFO] [stderr] | [INFO] [stderr] 5 | return Err(err!(1Bar)); [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: unreachable expression [INFO] [stderr] --> trybuild/fail/invalid_ident.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 5 | return Err(err!(1Bar)); [INFO] [stderr] | ---------------------- any code following this expression is unreachable [INFO] [stderr] 6 | Ok(()) [INFO] [stderr] | ^^^^^^ unreachable expression [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ [INFO] [stderr] note: If the actual output is the correct output you can bless it by rerunning [INFO] [stderr] your test with the environment variable TRYBUILD=overwrite [INFO] [stderr] [INFO] [stderr] test trybuild/fail/invalid_signature.rs [should fail to compile] ... ok [INFO] [stderr] test trybuild/fail/unsupported_macro_args.rs [should fail to compile] ... ok [INFO] [stderr] [INFO] [stderr] [INFO] [stdout] test tests::trybuild ... FAILED [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] [INFO] [stdout] ---- tests::readme stdout ---- [INFO] [stdout] [INFO] [stdout] thread 'tests::readme' (29) panicked at src/lib.rs:331:9: [INFO] [stdout] assertion failed: `(left == right)` [INFO] [stdout] [INFO] [stdout] Diff < left / right > : [INFO] [stdout] >
 [INFO] [stdout] > [INFO] [stdout] >[![crates-io](https://img.shields.io/crates/v/errgo.svg)](https://crates.io/crates/errgo) [INFO] [stdout] >[![docs-rs](https://docs.rs/errgo/badge.svg)](https://docs.rs/errgo) [INFO] [stdout] >[![github](https://img.shields.io/static/v1?label=&message=github&color=grey&logo=github)](https://github.com/aatifsyed/errgo) [INFO] [stdout] > [INFO] [stdout] >
 [INFO] [stdout] > [INFO] [stdout] ># `errgo` [INFO] [stdout] > [INFO] [stdout] >Generate `enum` error variants inline. [INFO] [stdout] > [INFO] [stdout] >A slightly type-safer take on [anyhow], where each ad-hoc error is handleable by the caller. [INFO] [stdout] >Designed to play nice with other crates like [strum] or [thiserror]. [INFO] [stdout] > [INFO] [stdout] >This crate was written to aid wrapping C APIs - transforming e.g error codes to handleable messages. [INFO] [stdout] >It shouldn't really be used for library api entry points - a well-considered top-level error type is likely to be both more readable and forward compatible. [INFO] [stdout] >Consider reading [Study of `std::io::Error`](https://matklad.github.io/2020/10/15/study-of-std-io-error.html) or simply making all generated structs `pub(crate)`. [INFO] [stdout] > [INFO] [stdout] >```rust [INFO] [stdout] >use errgo::errgo; [INFO] [stdout] > [INFO] [stdout] >#[errgo] [INFO] [stdout] >fn shave_yaks( [INFO] [stdout] > num_yaks: usize, [INFO] [stdout] > empty_buckets: usize, [INFO] [stdout] > num_razors: usize, [INFO] [stdout] >) -> Result<(), ShaveYaksError> { [INFO] [stdout] > if num_razors == 0 { [INFO] [stdout] > return Err(err!(NotEnoughRazors)); [INFO] [stdout] > } [INFO] [stdout] > if num_yaks > empty_buckets { [INFO] [stdout] > return Err(err!(NotEnoughBuckets { [INFO] [stdout] > got: usize = empty_buckets, [INFO] [stdout] > required: usize = num_yaks, [INFO] [stdout] > })); [INFO] [stdout] > } [INFO] [stdout] > Ok(()) [INFO] [stdout] >} [INFO] [stdout] >``` [INFO] [stdout] >Under the hood, a struct like this is generated: [INFO] [stdout] >```rust [INFO] [stdout] >enum ShaveYaksError { // name and visibility are taken from function return type and visibility [INFO] [stdout] > NotEnoughRazors, [INFO] [stdout] > NotEnoughBuckets { [INFO] [stdout] > got: usize, [INFO] [stdout] > required: usize, [INFO] [stdout] > } [INFO] [stdout] >} [INFO] [stdout] >``` [INFO] [stdout] >Note that the struct definition is placed just above the function body, meaning that you can't use [`errgo`] on functions in `impl` blocks - you'll have to move the function body to an outer scope, and call it in the impl block. [INFO] [stdout] > [INFO] [stdout] > [INFO] [stdout] >Importantly, you can derive on the generated struct, _and_ passthrough attributes, allowing you to use crates like [thiserror] or [strum]. [INFO] [stdout] >See the [`errgo`] documentation for other arguments accepted by the macro. [INFO] [stdout] >```rust [INFO] [stdout] > [INFO] [stdout] >#[errgo(derive(Debug, thiserror::Error))] [INFO] [stdout] >fn shave_yaks( [INFO] [stdout] > num_yaks: usize, [INFO] [stdout] > empty_buckets: usize, [INFO] [stdout] > num_razors: usize, [INFO] [stdout] >) -> Result<(), ShaveYaksError> { [INFO] [stdout] > if num_razors == 0 { [INFO] [stdout] > return Err(err!( [INFO] [stdout] > #[error("not enough razors!")] [INFO] [stdout] > NotEnoughRazors [INFO] [stdout] > )); [INFO] [stdout] > } [INFO] [stdout] > if num_yaks > empty_buckets { [INFO] [stdout] > return Err(err!( [INFO] [stdout] > #[error("not enough buckets - needed {required}")] [INFO] [stdout] > NotEnoughBuckets { [INFO] [stdout] > got: usize = empty_buckets, [INFO] [stdout] > required: usize = num_yaks, [INFO] [stdout] > } [INFO] [stdout] > )); [INFO] [stdout] > } [INFO] [stdout] > Ok(()) [INFO] [stdout] >} [INFO] [stdout] >``` [INFO] [stdout] > [INFO] [stdout] >Which generates the following: [INFO] [stdout] >```rust [INFO] [stdout] >#[derive(Debug, thiserror::Error)] [INFO] [stdout] >enum ShaveYaksError { [INFO] [stdout] > #[error("not enough razors!")] [INFO] [stdout] > NotEnoughRazors, [INFO] [stdout] > #[error("not enough buckets - needed {required}")] [INFO] [stdout] > NotEnoughBuckets { [INFO] [stdout] > got: usize, [INFO] [stdout] > required: usize, [INFO] [stdout] > } [INFO] [stdout] >} [INFO] [stdout] >``` [INFO] [stdout] >And `err!` macro invocations are replaced with struct instantiations - no matter where they are in the function body! [INFO] [stdout] > [INFO] [stdout] >If you need to reuse the same variant within a function, just use the normal construction syntax: [INFO] [stdout] >```rust [INFO] [stdout] >#[errgo] [INFO] [stdout] >fn foo() -> Result<(), FooError> { [INFO] [stdout] > fallible_op().map_err(|e| err!(IoError(io::Error = e))); [INFO] [stdout] > Err(FooError::IoError(todo!())) [INFO] [stdout] >} [INFO] [stdout] >``` [INFO] [stdout] > [INFO] [stdout] >[anyhow]: https://docs.rs/anyhow [INFO] [stdout] >[thiserror]: https://docs.rs/thiserror [INFO] [stdout] >[strum]: https://docs.rs/strum [INFO] [stdout] > [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x727ddb2bf94a - std[31e582c13f4e914f]::backtrace_rs::backtrace::libunwind::trace [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x727ddb2bf94a - std[31e582c13f4e914f]::backtrace_rs::backtrace::trace_unsynchronized:: [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x727ddb2bf94a - std[31e582c13f4e914f]::sys::backtrace::_print_fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:74:9 [INFO] [stdout] 3: 0x727ddb2bf94a - <::print::DisplayBacktrace as core[fa0eadad68403074]::fmt::Display>::fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:44:26 [INFO] [stdout] 4: 0x727ddb3019ba - ::fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/fmt/rt.rs:152:76 [INFO] [stdout] 5: 0x727ddb3019ba - core[fa0eadad68403074]::fmt::write [INFO] [stdout] 6: 0x727ddb2d0ed2 - std[31e582c13f4e914f]::io::default_write_fmt::> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x727ddb2d0ed2 - as std[31e582c13f4e914f]::io::Write>::write_fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/io/mod.rs:1994:13 [INFO] [stdout] 8: 0x727ddb28f1af - ::print [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:47:9 [INFO] [stdout] 9: 0x727ddb28f1af - std[31e582c13f4e914f]::panicking::default_hook::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:292:27 [INFO] [stdout] 10: 0x727ddb2b1bc9 - std[31e582c13f4e914f]::panicking::default_hook [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:316:9 [INFO] [stdout] 11: 0x5d85678e2e5c - core[fa0eadad68403074]::ops::function::Fn<(&'a std[31e582c13f4e914f]::panic::PanicHookInfo<'b>,), Output = ()> + core[fa0eadad68403074]::marker::Sync + core[fa0eadad68403074]::marker::Send> as core[fa0eadad68403074]::ops::function::Fn<(&std[31e582c13f4e914f]::panic::PanicHookInfo,)>>::call [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/alloc/src/boxed.rs:2254:9 [INFO] [stdout] 12: 0x5d85678e2e5c - test[7530e63dc052480e]::test_main_with_exit_callback::::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x727ddb2b1e42 - core[fa0eadad68403074]::ops::function::Fn<(&'a std[31e582c13f4e914f]::panic::PanicHookInfo<'b>,), Output = ()> + core[fa0eadad68403074]::marker::Sync + core[fa0eadad68403074]::marker::Send> as core[fa0eadad68403074]::ops::function::Fn<(&std[31e582c13f4e914f]::panic::PanicHookInfo,)>>::call [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/alloc/src/boxed.rs:2254:9 [INFO] [stdout] 14: 0x727ddb2b1e42 - std[31e582c13f4e914f]::panicking::panic_with_hook [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:833:13 [INFO] [stdout] 15: 0x727ddb28f268 - std[31e582c13f4e914f]::panicking::panic_handler::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:698:13 [INFO] [stdout] 16: 0x727ddb283309 - std[31e582c13f4e914f]::sys::backtrace::__rust_end_short_backtrace:: [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:182:18 [INFO] [stdout] 17: 0x727ddb29094d - __rustc[fc8e3a9f23f26cb]::rust_begin_unwind [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:689:5 [INFO] [stdout] 18: 0x727ddb3023cc - core[fa0eadad68403074]::panicking::panic_fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/panicking.rs:80:14 [INFO] [stdout] 19: 0x5d856766f96b - errgo[3d84d47902b90075]::tests::readme [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:331:9 [INFO] [stdout] 20: 0x5d856766ca17 - errgo[3d84d47902b90075]::tests::readme::{closure#0} [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:323:16 [INFO] [stdout] 21: 0x5d856766b366 - >::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 22: 0x5d85678d6f3b - core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String> as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 23: 0x5d85678d6f3b - test[7530e63dc052480e]::__rust_begin_short_backtrace::, fn() -> core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:663:18 [INFO] [stdout] 24: 0x5d85678e392b - test[7530e63dc052480e]::run_test_in_process::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:686:74 [INFO] [stdout] 25: 0x5d85678e392b - as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/panic/unwind_safe.rs:275:9 [INFO] [stdout] 26: 0x5d85678e392b - std[31e582c13f4e914f]::panicking::catch_unwind::do_call::, core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:581:40 [INFO] [stdout] 27: 0x5d85678e392b - std[31e582c13f4e914f]::panicking::catch_unwind::, core[fa0eadad68403074]::panic::unwind_safe::AssertUnwindSafe> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:544:19 [INFO] [stdout] 28: 0x5d85678e392b - std[31e582c13f4e914f]::panic::catch_unwind::, core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panic.rs:359:14 [INFO] [stdout] 29: 0x5d85678e392b - test[7530e63dc052480e]::run_test_in_process [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:686:27 [INFO] [stdout] 30: 0x5d85678e392b - test[7530e63dc052480e]::run_test::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:607:43 [INFO] [stdout] 31: 0x5d85678ddd84 - test[7530e63dc052480e]::run_test::{closure#1} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:637:41 [INFO] [stdout] 32: 0x5d85678ddd84 - std[31e582c13f4e914f]::sys::backtrace::__rust_begin_short_backtrace:: [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:166:18 [INFO] [stdout] 33: 0x5d85678e6532 - std[31e582c13f4e914f]::thread::lifecycle::spawn_unchecked::::{closure#1}::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/thread/lifecycle.rs:91:13 [INFO] [stdout] 34: 0x5d85678e6532 - ::{closure#1}::{closure#0}> as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/panic/unwind_safe.rs:275:9 [INFO] [stdout] 35: 0x5d85678e6532 - std[31e582c13f4e914f]::panicking::catch_unwind::do_call::::{closure#1}::{closure#0}>, ()> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:581:40 [INFO] [stdout] 36: 0x5d85678e6532 - std[31e582c13f4e914f]::panicking::catch_unwind::<(), core[fa0eadad68403074]::panic::unwind_safe::AssertUnwindSafe::{closure#1}::{closure#0}>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:544:19 [INFO] [stdout] 37: 0x5d85678e6532 - std[31e582c13f4e914f]::panic::catch_unwind::::{closure#1}::{closure#0}>, ()> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panic.rs:359:14 [INFO] [stdout] 38: 0x5d85678e6532 - std[31e582c13f4e914f]::thread::lifecycle::spawn_unchecked::::{closure#1} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/thread/lifecycle.rs:89:26 [INFO] [stdout] 39: 0x5d85678e6532 - ::{closure#1} as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 40: 0x727ddb2bd02f - + core[fa0eadad68403074]::marker::Send> as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/alloc/src/boxed.rs:2240:9 [INFO] [stdout] 41: 0x727ddb2bd02f - ::new::thread_start [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/thread/unix.rs:118:17 [INFO] [stdout] 42: 0x727ddb034aa4 - [INFO] [stdout] 43: 0x727ddb0c1a64 - clone [INFO] [stdout] 44: 0x0 - [INFO] [stdout] [INFO] [stdout] ---- tests::trybuild stdout ---- [INFO] [stdout] [INFO] [stdout] thread 'tests::trybuild' (30) panicked at /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/trybuild-1.0.116/src/run.rs:102:13: [INFO] [stdout] 1 of 13 tests failed [INFO] [stdout] stack backtrace: [INFO] [stdout] 0: 0x727ddb2bf94a - std[31e582c13f4e914f]::backtrace_rs::backtrace::libunwind::trace [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9 [INFO] [stdout] 1: 0x727ddb2bf94a - std[31e582c13f4e914f]::backtrace_rs::backtrace::trace_unsynchronized:: [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14 [INFO] [stdout] 2: 0x727ddb2bf94a - std[31e582c13f4e914f]::sys::backtrace::_print_fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:74:9 [INFO] [stdout] 3: 0x727ddb2bf94a - <::print::DisplayBacktrace as core[fa0eadad68403074]::fmt::Display>::fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:44:26 [INFO] [stdout] 4: 0x727ddb3019ba - ::fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/fmt/rt.rs:152:76 [INFO] [stdout] 5: 0x727ddb3019ba - core[fa0eadad68403074]::fmt::write [INFO] [stdout] 6: 0x727ddb2d0ed2 - std[31e582c13f4e914f]::io::default_write_fmt::> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/io/mod.rs:639:11 [INFO] [stdout] 7: 0x727ddb2d0ed2 - as std[31e582c13f4e914f]::io::Write>::write_fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/io/mod.rs:1994:13 [INFO] [stdout] 8: 0x727ddb28f1af - ::print [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:47:9 [INFO] [stdout] 9: 0x727ddb28f1af - std[31e582c13f4e914f]::panicking::default_hook::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:292:27 [INFO] [stdout] 10: 0x727ddb2b1bc9 - std[31e582c13f4e914f]::panicking::default_hook [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:316:9 [INFO] [stdout] 11: 0x5d85678e2e5c - core[fa0eadad68403074]::ops::function::Fn<(&'a std[31e582c13f4e914f]::panic::PanicHookInfo<'b>,), Output = ()> + core[fa0eadad68403074]::marker::Sync + core[fa0eadad68403074]::marker::Send> as core[fa0eadad68403074]::ops::function::Fn<(&std[31e582c13f4e914f]::panic::PanicHookInfo,)>>::call [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/alloc/src/boxed.rs:2254:9 [INFO] [stdout] 12: 0x5d85678e2e5c - test[7530e63dc052480e]::test_main_with_exit_callback::::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:145:21 [INFO] [stdout] 13: 0x727ddb2b1e42 - core[fa0eadad68403074]::ops::function::Fn<(&'a std[31e582c13f4e914f]::panic::PanicHookInfo<'b>,), Output = ()> + core[fa0eadad68403074]::marker::Sync + core[fa0eadad68403074]::marker::Send> as core[fa0eadad68403074]::ops::function::Fn<(&std[31e582c13f4e914f]::panic::PanicHookInfo,)>>::call [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/alloc/src/boxed.rs:2254:9 [INFO] [stdout] 14: 0x727ddb2b1e42 - std[31e582c13f4e914f]::panicking::panic_with_hook [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:833:13 [INFO] [stdout] 15: 0x727ddb28f268 - std[31e582c13f4e914f]::panicking::panic_handler::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:698:13 [INFO] [stdout] 16: 0x727ddb283309 - std[31e582c13f4e914f]::sys::backtrace::__rust_end_short_backtrace:: [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:182:18 [INFO] [stdout] 17: 0x727ddb29094d - __rustc[fc8e3a9f23f26cb]::rust_begin_unwind [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:689:5 [INFO] [stdout] 18: 0x727ddb3023cc - core[fa0eadad68403074]::panicking::panic_fmt [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/panicking.rs:80:14 [INFO] [stdout] 19: 0x5d85677705c4 - ::run [INFO] [stdout] at /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/trybuild-1.0.116/src/run.rs:102:13 [INFO] [stdout] 20: 0x5d856777f0c8 - ::drop [INFO] [stdout] at /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/trybuild-1.0.116/src/lib.rs:342:38 [INFO] [stdout] 21: 0x5d8567663917 - core[fa0eadad68403074]::ptr::drop_in_place:: [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/ptr/mod.rs:809:1 [INFO] [stdout] 22: 0x5d856766fa1b - errgo[3d84d47902b90075]::tests::trybuild [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:320:5 [INFO] [stdout] 23: 0x5d856766ca47 - errgo[3d84d47902b90075]::tests::trybuild::{closure#0} [INFO] [stdout] at /opt/rustwide/workdir/src/lib.rs:316:18 [INFO] [stdout] 24: 0x5d856766b3a6 - >::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 25: 0x5d85678d6f3b - core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String> as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 26: 0x5d85678d6f3b - test[7530e63dc052480e]::__rust_begin_short_backtrace::, fn() -> core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:663:18 [INFO] [stdout] 27: 0x5d85678e392b - test[7530e63dc052480e]::run_test_in_process::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:686:74 [INFO] [stdout] 28: 0x5d85678e392b - as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/panic/unwind_safe.rs:275:9 [INFO] [stdout] 29: 0x5d85678e392b - std[31e582c13f4e914f]::panicking::catch_unwind::do_call::, core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:581:40 [INFO] [stdout] 30: 0x5d85678e392b - std[31e582c13f4e914f]::panicking::catch_unwind::, core[fa0eadad68403074]::panic::unwind_safe::AssertUnwindSafe> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:544:19 [INFO] [stdout] 31: 0x5d85678e392b - std[31e582c13f4e914f]::panic::catch_unwind::, core[fa0eadad68403074]::result::Result<(), alloc[49b8922c36ca62de]::string::String>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panic.rs:359:14 [INFO] [stdout] 32: 0x5d85678e392b - test[7530e63dc052480e]::run_test_in_process [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:686:27 [INFO] [stdout] 33: 0x5d85678e392b - test[7530e63dc052480e]::run_test::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:607:43 [INFO] [stdout] 34: 0x5d85678ddd84 - test[7530e63dc052480e]::run_test::{closure#1} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/test/src/lib.rs:637:41 [INFO] [stdout] 35: 0x5d85678ddd84 - std[31e582c13f4e914f]::sys::backtrace::__rust_begin_short_backtrace:: [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/backtrace.rs:166:18 [INFO] [stdout] 36: 0x5d85678e6532 - std[31e582c13f4e914f]::thread::lifecycle::spawn_unchecked::::{closure#1}::{closure#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/thread/lifecycle.rs:91:13 [INFO] [stdout] 37: 0x5d85678e6532 - ::{closure#1}::{closure#0}> as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/panic/unwind_safe.rs:275:9 [INFO] [stdout] 38: 0x5d85678e6532 - std[31e582c13f4e914f]::panicking::catch_unwind::do_call::::{closure#1}::{closure#0}>, ()> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:581:40 [INFO] [stdout] 39: 0x5d85678e6532 - std[31e582c13f4e914f]::panicking::catch_unwind::<(), core[fa0eadad68403074]::panic::unwind_safe::AssertUnwindSafe::{closure#1}::{closure#0}>> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panicking.rs:544:19 [INFO] [stdout] 40: 0x5d85678e6532 - std[31e582c13f4e914f]::panic::catch_unwind::::{closure#1}::{closure#0}>, ()> [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/panic.rs:359:14 [INFO] [stdout] 41: 0x5d85678e6532 - std[31e582c13f4e914f]::thread::lifecycle::spawn_unchecked::::{closure#1} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/thread/lifecycle.rs:89:26 [INFO] [stdout] 42: 0x5d85678e6532 - ::{closure#1} as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/core/src/ops/function.rs:250:5 [INFO] [stdout] 43: 0x727ddb2bd02f - + core[fa0eadad68403074]::marker::Send> as core[fa0eadad68403074]::ops::function::FnOnce<()>>::call_once [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/alloc/src/boxed.rs:2240:9 [INFO] [stdout] 44: 0x727ddb2bd02f - ::new::thread_start [INFO] [stdout] at /rustc/562dee4820c458d823175268e41601d4c060588a/library/std/src/sys/thread/unix.rs:118:17 [INFO] [stdout] 45: 0x727ddb034aa4 - [INFO] [stdout] 46: 0x727ddb0c1a64 - clone [INFO] [stdout] 47: 0x0 - [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] failures: [INFO] [stdout] tests::readme [INFO] [stdout] tests::trybuild [INFO] [stdout] [INFO] [stdout] test result: FAILED. 12 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 40.01s [INFO] [stdout] [INFO] [stderr] error: test failed, to rerun pass `--lib` [INFO] running `Command { std: "docker" "inspect" "4717b46b3424b26f4c0d9b04f079a3b5de374ad5ece29be9b5351f85f5d4bb98", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4717b46b3424b26f4c0d9b04f079a3b5de374ad5ece29be9b5351f85f5d4bb98", kill_on_drop: false }` [INFO] [stdout] 4717b46b3424b26f4c0d9b04f079a3b5de374ad5ece29be9b5351f85f5d4bb98