[INFO] fetching crate reduce_unsafe 0.1.0... [INFO] checking reduce_unsafe-0.1.0 against master#f609b7e0586f81fefb3523e3e17adf779ac416be for pr-129466-2 [INFO] extracting crate reduce_unsafe 0.1.0 into /workspace/builds/worker-7-tc1/source [INFO] validating manifest of crates.io crate reduce_unsafe 0.1.0 on toolchain f609b7e0586f81fefb3523e3e17adf779ac416be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate reduce_unsafe 0.1.0 [INFO] finished tweaking crates.io crate reduce_unsafe 0.1.0 [INFO] tweaked toml for crates.io crate reduce_unsafe 0.1.0 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8646aedb18e5d69640616fc42fd331e1e763e7b27ba97ecd574d10a007b67cb0 [INFO] running `Command { std: "docker" "start" "-a" "8646aedb18e5d69640616fc42fd331e1e763e7b27ba97ecd574d10a007b67cb0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8646aedb18e5d69640616fc42fd331e1e763e7b27ba97ecd574d10a007b67cb0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8646aedb18e5d69640616fc42fd331e1e763e7b27ba97ecd574d10a007b67cb0", kill_on_drop: false }` [INFO] [stdout] 8646aedb18e5d69640616fc42fd331e1e763e7b27ba97ecd574d10a007b67cb0 [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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] dbc37d27cbae542918e24be9abd1fe67ab0228071ed6e07938ac2a53f9add9f6 [INFO] running `Command { std: "docker" "start" "-a" "dbc37d27cbae542918e24be9abd1fe67ab0228071ed6e07938ac2a53f9add9f6", kill_on_drop: false }` [INFO] [stderr] Checking reduce_unsafe v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition name: `reduce_unsafe` [INFO] [stdout] --> src/lib.rs:81:12 [INFO] [stdout] | [INFO] [stdout] 81 | #[cfg_attr(reduce_unsafe, should_panic)] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(reduce_unsafe)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(reduce_unsafe)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `reduce_unsafe` [INFO] [stdout] --> src/lib.rs:81:12 [INFO] [stdout] | [INFO] [stdout] 81 | #[cfg_attr(reduce_unsafe, should_panic)] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(reduce_unsafe)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(reduce_unsafe)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `reduce_unsafe` [INFO] [stdout] --> src/lib.rs:46:19 [INFO] [stdout] | [INFO] [stdout] 46 | #[cfg(not(reduce_unsafe))] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | let s = unchecked!( [INFO] [stdout] | _____________- [INFO] [stdout] 85 | | unsafe { core::str::from_utf8_unchecked(b) }, [INFO] [stdout] 86 | | core::str::from_utf8(b).expect("BUG: unsound unsafe code detected") [INFO] [stdout] 87 | | ); [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(reduce_unsafe)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(reduce_unsafe)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the macro `unchecked` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `reduce_unsafe` [INFO] [stdout] --> src/lib.rs:50:15 [INFO] [stdout] | [INFO] [stdout] 50 | #[cfg(reduce_unsafe)] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 84 | let s = unchecked!( [INFO] [stdout] | _____________- [INFO] [stdout] 85 | | unsafe { core::str::from_utf8_unchecked(b) }, [INFO] [stdout] 86 | | core::str::from_utf8(b).expect("BUG: unsound unsafe code detected") [INFO] [stdout] 87 | | ); [INFO] [stdout] | |_____- in this macro invocation [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(reduce_unsafe)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(reduce_unsafe)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the macro `unchecked` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: calls to `std::str::from_utf8_unchecked` with a invalid literal are undefined behavior [INFO] [stdout] --> src/lib.rs:85:18 [INFO] [stdout] | [INFO] [stdout] 83 | let b = b"hello world\xff"; [INFO] [stdout] | ------------------ the literal was valid UTF-8 up to the 11 bytes [INFO] [stdout] 84 | let s = unchecked!( [INFO] [stdout] 85 | unsafe { core::str::from_utf8_unchecked(b) }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[deny(invalid_from_utf8_unchecked)]` on by default [INFO] [stdout] = note: this error originates in the macro `__reduce_unsafe_internal` which comes from the expansion of the macro `unchecked` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: calls to `std::str::from_utf8_unchecked` with a invalid literal are undefined behavior [INFO] [stdout] --> src/lib.rs:96:18 [INFO] [stdout] | [INFO] [stdout] 94 | let b = b"hello world\xff"; [INFO] [stdout] | ------------------ the literal was valid UTF-8 up to the 11 bytes [INFO] [stdout] 95 | let _ = checked!( [INFO] [stdout] 96 | unsafe { core::str::from_utf8_unchecked(b) }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `__reduce_unsafe_internal` which comes from the expansion of the macro `checked` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `std::str::from_utf8` with a invalid literal always return an error [INFO] [stdout] --> src/lib.rs:97:9 [INFO] [stdout] | [INFO] [stdout] 94 | let b = b"hello world\xff"; [INFO] [stdout] | ------------------ the literal was valid UTF-8 up to the 11 bytes [INFO] [stdout] ... [INFO] [stdout] 97 | core::str::from_utf8(b).expect("BUG: unsound unsafe code detected") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(invalid_from_utf8)]` on by default [INFO] [stdout] = note: this warning originates in the macro `__reduce_unsafe_internal` which comes from the expansion of the macro `checked` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors; 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `reduce_unsafe` (lib test) due to 3 previous errors; 4 warnings emitted [INFO] running `Command { std: "docker" "inspect" "dbc37d27cbae542918e24be9abd1fe67ab0228071ed6e07938ac2a53f9add9f6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dbc37d27cbae542918e24be9abd1fe67ab0228071ed6e07938ac2a53f9add9f6", kill_on_drop: false }` [INFO] [stdout] dbc37d27cbae542918e24be9abd1fe67ab0228071ed6e07938ac2a53f9add9f6