rust icon indicating copy to clipboard operation
rust copied to clipboard

Implement RFC 3373: Avoid non-local definitions in functions

Open Urgau opened this issue 5 months ago • 30 comments

This PR implements RFC 3373: Avoid non-local definitions in functions.

Urgau avatar Jan 26 '24 17:01 Urgau

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

rustbot avatar Jan 26 '24 17:01 rustbot

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

rustbot avatar Jan 26 '24 17:01 rustbot

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_5cba4052-8f61-455c-a417-6abc1c67ad18
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_5cba4052-8f61-455c-a417-6abc1c67ad18
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=ef3687e870d3e3b386577e4e7b6dccde297fd3c6
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_5cba4052-8f61-455c-a417-6abc1c67ad18
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_5cba4052-8f61-455c-a417-6abc1c67ad18
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=ef3687e870d3e3b386577e4e7b6dccde297fd3c6
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
thread 'main' panicked at src/tools/clippy/tests/compile-test.rs:173:6:
called `Result::unwrap()` on an `Err` value: tests failed

Location:
command: CLIPPY_CONF_DIR="tests" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-88cd92e38577594d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-6d91538484033e4e.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-c555dfce7b7b4482.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-9cfde403f4813861.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-7f737c8175775d48.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-5a42172620baa7f7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-067e61b28e8c0ae8.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-56de3874fe91412c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-67f57c9d74692487.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-1ddd9d5371e89c55.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-0080dad30daeaebf.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-95373de42170edbf.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/from_over_into.rs" "--edition" "2021"
error: actual output differed from expected
    /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.21.2/src/lib.rs:388:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test compile-test`
error: test failed, to rerun pass `--test compile-test`
Execute `cargo uibless` to update `tests/ui/from_over_into.stderr` to the actual output
--- tests/ui/from_over_into.stderr
+++ <stderr output>
 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
... 85 lines skipped ...
 
 
 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
+  --> $DIR/from_over_into.rs:96:5
    |
 LL |     impl Into<()> for Hello {
... 10 lines skipped ...
... 10 lines skipped ...
 error: aborting due to 7 previous errors
 


full stderr:
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   |
LL | impl Into<StringWrapper> for String {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = note: `-D clippy::from-over-into` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::from_over_into)]`
help: replace the `Into` implementation with `From<std::string::String>`
   |
LL ~ impl From<String> for StringWrapper {
LL ~     fn from(val: String) -> Self {
LL ~         StringWrapper(val)


error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   |
LL | impl Into<SelfType> for String {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   |
help: replace the `Into` implementation with `From<std::string::String>`
   |
LL ~ impl From<String> for SelfType {
LL ~     fn from(val: String) -> Self {
LL ~         SelfType(String::new())


error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   |
   |
LL | impl Into<SelfKeywords> for X {
   |
   |
help: replace the `Into` implementation with `From<X>`
   |
LL ~ impl From<X> for SelfKeywords {
LL ~     fn from(val: X) -> Self {
LL ~         let _ = X;
LL ~         let _ = X::FOO;
LL ~         let _: X = val;


error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   |
   |
LL | impl core::convert::Into<bool> for crate::ExplicitPaths {
   |
   |
   = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
           https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
help: replace the `Into` implementation with `From<ExplicitPaths>`
   |
LL ~ impl core::convert::From<crate::ExplicitPaths> for bool {
LL ~     fn from(mut val: crate::ExplicitPaths) -> Self {
LL ~         let in_closure = || val.0;
LL | 
LL ~         val.0 = false;
LL ~         val.0


error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   |
LL | impl Into<String> for PathInExpansion {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
           https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
help: replace the `Into` implementation with `From<PathInExpansion>`
   |
LL ~ impl From<PathInExpansion> for String {
LL ~     fn from(val: PathInExpansion) -> Self {


error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   |
   |
LL |     impl<T> Into<FromOverInto<T>> for Vec<T> {
   |
   |
help: replace the `Into` implementation with `From<std::vec::Vec<T>>`
   |
LL ~     impl<T> From<Vec<T>> for FromOverInto<T> {
LL ~         fn from(val: Vec<T>) -> Self {
LL ~             FromOverInto(val)


error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   |
LL |     impl Into<()> for Hello {
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   |
   = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
           https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
help: replace the `Into` implementation with `From<issue_12138::Hello>`
   |
LL ~     impl From<Hello> for () {
LL ~         fn from(val: Hello) {}

error: aborting due to 7 previous errors


---

Build completed unsuccessfully in 0:01:49


command did not execute successfully: cd "/checkout" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_unknown_linux_gnu="ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="true" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="true" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools" CC_x86_64_unknown_linux_gnu="sccache cc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.77.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.77.0" CFG_VERSION="1.77.0-nightly (ef3687e87 2024-01-26)" CFG_VER_DATE="2024-01-26" CFG_VER_HASH="ef3687e870d3e3b386577e4e7b6dccde297fd3c6" CFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXXFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXX_x86_64_unknown_linux_gnu="sccache c++" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" HOST_LIBS="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" LIBC_CHECK_CFG="1" LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/lib" LIBZ_SYS_STATIC="1" LZMA_API_STATIC="1" RANLIB_x86_64_unknown_linux_gnu="ar s" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/native" RUSTC="/checkout/obj/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/checkout/obj/build/tmp/extended-error-metadata" RUSTC_HOST_FLAGS="-Zunstable-options --check-cfg=cfg(bootstrap)" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Dwarnings" RUSTC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_STAGE="2" RUSTC_SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" RUSTC_TEST_SUITE="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/checkout/obj/build/bootstrap/debug/rustc" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.77.0-nightly\t(ef3687e87\t2024-01-26)" RUSTDOC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTDOC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Csplit-debuginfo=off -Zunstable-options" RUST_TEST_THREADS="16" SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" TERM="xterm" __CARGO_DEFAULT_LIB_METADATA="nightlytool-rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "-Zcheck-cfg" "-Zbinary-dep-depinfo" "-j" "16" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/clippy/Cargo.toml" "--" "--quiet"

stdout ----

stderr ----

rust-log-analyzer avatar Jan 26 '24 18:01 rust-log-analyzer

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_26687979-9141-4aaf-acec-97e83dacaf66
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_26687979-9141-4aaf-acec-97e83dacaf66
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=a2863c826af1c500c0ff4114d402593e123cc6ca
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_26687979-9141-4aaf-acec-97e83dacaf66
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_26687979-9141-4aaf-acec-97e83dacaf66
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=a2863c826af1c500c0ff4114d402593e123cc6ca
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
   Compiling serde_json v1.0.99
   Compiling toml_edit v0.19.11
   Compiling cargo_metadata v0.15.4
   Compiling toml v0.7.5
error: non local definition should be avoided as they go against expectation
   |
   |
69 | /     impl From<&FileName> for rustc_span::FileName {
70 | |         fn from(filename: &FileName) -> rustc_span::FileName {
72 | |                 FileName::Real(path) => {
...  |
77 | |         }
78 | |     }
78 | |     }
   | |_____^
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
   = note: `-D non-local-definitions` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(non_local_definitions)]`
error: could not compile `rustfmt-nightly` (lib) due to 1 previous error



command did not execute successfully: cd "/checkout" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_unknown_linux_gnu="ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="true" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="true" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools" CC_x86_64_unknown_linux_gnu="sccache cc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.77.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.77.0" CFG_VERSION="1.77.0-nightly (a2863c826 2024-01-26)" CFG_VER_DATE="2024-01-26" CFG_VER_HASH="a2863c826af1c500c0ff4114d402593e123cc6ca" CFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXXFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXX_x86_64_unknown_linux_gnu="sccache c++" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" LIBC_CHECK_CFG="1" LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/lib" LIBZ_SYS_STATIC="1" LZMA_API_STATIC="1" RANLIB_x86_64_unknown_linux_gnu="ar s" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/native" RUSTC="/checkout/obj/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/checkout/obj/build/tmp/extended-error-metadata" RUSTC_HOST_FLAGS="-Zunstable-options --check-cfg=cfg(bootstrap)" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Dwarnings" RUSTC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_STAGE="2" RUSTC_SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/checkout/obj/build/bootstrap/debug/rustc" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.77.0-nightly\t(a2863c826\t2024-01-26)" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Csplit-debuginfo=off -Zunstable-options" RUST_TEST_THREADS="16" SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" TERM="xterm" __CARGO_DEFAULT_LIB_METADATA="nightlytool-rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "-Zcheck-cfg" "-Zbinary-dep-depinfo" "-j" "16" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rustfmt/Cargo.toml"
expected success, got: exit status: 101

stdout ----

rust-log-analyzer avatar Jan 26 '24 20:01 rust-log-analyzer

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

rustbot avatar Jan 26 '24 20:01 rustbot

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_16949ace-bf94-407b-9322-991d3f7d005e
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_16949ace-bf94-407b-9322-991d3f7d005e
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=7e0c9aa37079fb11bcdd9fd14556ec097891bd7f
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_16949ace-bf94-407b-9322-991d3f7d005e
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_16949ace-bf94-407b-9322-991d3f7d005e
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=7e0c9aa37079fb11bcdd9fd14556ec097891bd7f
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Fri Jan 26 20:16:48 UTC 2024
  network time: Fri, 26 Jan 2024 20:16:48 GMT
  network time: Fri, 26 Jan 2024 20:16:48 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
##[endgroup]
Testing GCC stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
    Finished release [optimized] target(s) in 1.34s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --no-default-features --mini-tests --std-tests`
Using system GCC
Using system GCC
[BUILD] example
[AOT] mini_core_hello_world
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core_hello_world
abc
---
........

failures:

---- library/core/src/convert/mod.rs - convert::Into (line 398) stdout ----
error: non local definition should be avoided as they go against expectation
  |
  |
5 | / impl<T> From<Wrapper<T>> for Vec<T> {
6 | |     fn from(w: Wrapper<T>) -> Vec<T> {
8 | |     }
9 | | }
  | |_^
  |
  |
  = help: move this declaration outside the of the 2 outermost bodies
  = note: this may become deny-by-default in the Edition 2024 and higher
 --> library/core/src/convert/mod.rs:396:9
  |
1 | #![deny(warnings)]
  |         ^^^^^^^^
---
    library/core/src/convert/mod.rs - convert::Into (line 398)

test result: FAILED. 4541 passed; 1 failed; 42 ignored; 0 measured; 0 filtered out; finished in 54.25s

error: doctest failed, to rerun pass `-p core --doc`
  local time: Fri Jan 26 20:38:31 UTC 2024
  network time: Fri, 26 Jan 2024 20:38:31 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

rust-log-analyzer avatar Jan 26 '24 20:01 rust-log-analyzer

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_0fabcbc8-f818-4e97-bc84-d2765cba26dc
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_0fabcbc8-f818-4e97-bc84-d2765cba26dc
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=954b7af36a366db69e4830412296aea0242805c7
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_0fabcbc8-f818-4e97-bc84-d2765cba26dc
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_0fabcbc8-f818-4e97-bc84-d2765cba26dc
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=954b7af36a366db69e4830412296aea0242805c7
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Sat Jan 27 00:12:53 UTC 2024
  network time: Sat, 27 Jan 2024 00:12:53 GMT
  network time: Sat, 27 Jan 2024 00:12:53 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
........................................................................................ 11176/16054
........................................................................................ 11264/16054
........................................................................................ 11352/16054
..........................................................i............................. 11440/16054
F.............................................F......................................... 11528/16054
...........................................................ii................i.....iii.. 11704/16054
........................................................................................ 11792/16054
........................................................................................ 11880/16054
........................................................................................ 11968/16054
---
failures:

---- [ui] tests/ui/macros/type-macros-simple.rs stdout ----
normalized stderr:
warning: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl<T> std::ops::Index<m!()> for dyn Trait<(m!(), T)>
LL | |         where T: Trait<m!()>
LL | |         type Output = m!();
...  |
LL | |         }
LL | |     }
LL | |     }
   | |_____^
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher

warning: 1 warning emitted


---
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/macros/type-macros-simple.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/type-macros-simple/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/macros/type-macros-simple/auxiliary"
stdout: none
--- stderr -------------------------------
warning: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl<T> std::ops::Index<m!()> for dyn Trait<(m!(), T)>
LL | |         where T: Trait<m!()>
LL | |         type Output = m!();
...  |
LL | |         }
LL | |     }
LL | |     }
   | |_____^
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher

warning: 1 warning emitted
------------------------------------------



---- [ui] tests/ui/privacy/associated-item-privacy-trait.rs stdout ----
diff of stderr:

+ warning: non local definition should be avoided as they go against expectation
+    |
+    |
+ LL |         impl PrivTr for u8 {}
+ ...
+ ...
+ LL |     priv_trait::mac!();
+    |
+    |
+    = help: move this declaration outside the of the 1 outermost bodies
+    = note: this may become deny-by-default in the Edition 2024 and higher
+    = note: `#[warn(non_local_definitions)]` on by default
+    = note: this warning originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
+ warning: non local definition should be avoided as they go against expectation
+    |
+    |
+ LL |         impl PubTr for u8 {}
+ ...
+ ...
+ LL |     priv_parent_substs::mac!();
+    |
+    |
+    = help: move this declaration outside the of the 1 outermost bodies
+    = note: this may become deny-by-default in the Edition 2024 and higher
+    = note: this warning originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
+ 
1 error: type `for<'a> fn(&'a priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
3    |

328    |
328    |
329    = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
- error: aborting due to 30 previous errors
+ error: aborting due to 30 previous errors; 2 warnings emitted
332 
333 
---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/privacy/associated-item-privacy-trait.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/associated-item-privacy-trait" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/associated-item-privacy-trait/auxiliary"
stdout: none
--- stderr -------------------------------
warning: non local definition should be avoided as they go against expectation
   |
   |
LL |         impl PrivTr for u8 {}
...
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
   = note: `#[warn(non_local_definitions)]` on by default
   = note: this warning originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

warning: non local definition should be avoided as they go against expectation
   |
   |
LL |         impl PubTr for u8 {}
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
   = note: this warning originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `for<'a> fn(&'a priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
   |
   |
LL |         let value = <Pub as PrivTr>::method;
...
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `for<'a> fn(&'a priv_trait::Pub) {<priv_trait::Pub as PrivTr>::method}` is private
   |
LL |         value;
   |         ^^^^^ private type
...
...
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `for<'a> fn(&'a Self) {<Self as PrivTr>::method}` is private
   |
   |
LL |         Pub.method();
...
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: associated constant `PrivTr::CONST` is private
   |
   |
LL |         <Pub as PrivTr>::CONST;
...
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: associated type `PrivTr::AssocTy` is private
   |
   |
LL |         let _: <Pub as PrivTr>::AssocTy;
...
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: associated type `PrivTr::AssocTy` is private
   |
   |
LL |         pub type InSignatureTy = <Pub as PrivTr>::AssocTy;
...
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
error: trait `PrivTr` is private
##[error]  --> /checkout/tests/ui/privacy/associated-item-privacy-trait.rs:27:34
   |
   |
LL |         pub trait InSignatureTr: PrivTr {}
   |                                  ^^^^^^ private trait
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
error: trait `PrivTr` is private
##[error]  --> /checkout/tests/ui/privacy/associated-item-privacy-trait.rs:29:14
   |
   |
LL |         impl PrivTr for u8 {}
   |              ^^^^^^ private trait
LL |     priv_trait::mac!();
   |     ------------------ in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_signature::Priv` is private
   |
   |
LL |         let value = <Pub as PubTr>::method;
...
LL |     priv_signature::mac!();
   |     ---------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_signature::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_signature::Priv` is private
   |
LL |         value;
   |         ^^^^^ private type
...
...
LL |     priv_signature::mac!();
   |     ---------------------- in this macro invocation
   |
   = note: this error originates in the macro `priv_signature::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_signature::Priv` is private
   |
   |
LL |         Pub.method(loop {});
...
LL |     priv_signature::mac!();
   |     ---------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_signature::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_substs::Priv` is private
   |
   |
LL |         let value = <Pub as PubTr>::method::<Priv>;
...
...
LL |     priv_substs::mac!();
   |
   |
   = note: this error originates in the macro `priv_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_substs::Priv` is private
   |
LL |         value;
   |         ^^^^^ private type
...
...
LL |     priv_substs::mac!();
   |
   |
   = note: this error originates in the macro `priv_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_substs::Priv` is private
   |
   |
LL |         Pub.method::<Priv>();
...
...
LL |     priv_substs::mac!();
   |
   |
   = note: this error originates in the macro `priv_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         let value = <Pub as PubTr>::method;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
LL |         value;
   |         ^^^^^ private type
...
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         let value = <Pub as PubTr<_>>::method;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
LL |         value;
   |         ^^^^^ private type
...
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         Pub.method();
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         let value = <Priv as PubTr<_>>::method;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
LL |         value;
   |         ^^^^^ private type
...
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         Priv.method();
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         <Pub as PubTr>::CONST;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         <Pub as PubTr<_>>::CONST;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         <Priv as PubTr<_>>::CONST;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         let _: <Pub as PubTr<_>>::AssocTy;
   |                              ^ private type
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         let _: <Priv as PubTr<_>>::AssocTy;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         pub type InSignatureTy1 = <Pub as PubTr>::AssocTy;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         pub type InSignatureTy2 = <Priv as PubTr<Pub>>::AssocTy;
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)

error: type `priv_parent_substs::Priv` is private
   |
   |
LL |         impl PubTr for u8 {}
...
LL |     priv_parent_substs::mac!();
   |     -------------------------- in this macro invocation
   |
   |
   = note: this error originates in the macro `priv_parent_substs::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 30 previous errors; 2 warnings emitted
------------------------------------------



---- [ui] tests/ui/privacy/private-in-public-non-principal.rs stdout ----
diff of stderr:

11    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
12    = note: `#[warn(private_interfaces)]` on by default
13 
+ warning: non local definition should be avoided as they go against expectation
+    |
+    |
+ LL | /     impl dyn PubPrincipal {
+ LL | |         pub fn check_doc_lint() {}
+ LL | |     }
+    |
+    |
+    = help: move this declaration outside the of the 1 outermost bodies
+    = note: this may become deny-by-default in the Edition 2024 and higher
+ 
14 error: missing documentation for an associated function
15   --> $DIR/private-in-public-non-principal.rs:13:9
16    |
16    |

23 LL | #[deny(missing_docs)]
24    |        ^^^^^^^^^^^^
25 
- error: aborting due to 1 previous error; 1 warning emitted
+ warning: non local definition should be avoided as they go against expectation
+    |
+    |
+ LL | /     impl dyn PubPrincipal + PrivNonPrincipal {
+ LL | |         pub fn check_doc_lint() {} // OK, no missing doc lint
+ LL | |     }
+    |
+    |
+    = help: move this declaration outside the of the 1 outermost bodies
+    = note: this may become deny-by-default in the Edition 2024 and higher
+ error: aborting due to 1 previous error; 3 warnings emitted
27 
28 

---
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/privacy/private-in-public-non-principal.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/private-in-public-non-principal" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/privacy/private-in-public-non-principal/auxiliary"
stdout: none
--- stderr -------------------------------
warning: trait `PrivNonPrincipal` is more private than the item `leak_dyn_nonprincipal`
   |
   |
LL | pub fn leak_dyn_nonprincipal() -> Box<dyn PubPrincipal + PrivNonPrincipal> { loop {} }
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `leak_dyn_nonprincipal` is reachable at visibility `pub`
   |
note: but trait `PrivNonPrincipal` is only usable at visibility `pub(crate)`
   |
   |
LL | auto trait PrivNonPrincipal {}
   = note: `#[warn(private_interfaces)]` on by default


warning: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl dyn PubPrincipal {
LL | |         pub fn check_doc_lint() {} //~ ERROR missing documentation for an associated function
   | |_____^
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher

error: missing documentation for an associated function
##[error]  --> /checkout/tests/ui/privacy/private-in-public-non-principal.rs:13:9
   |
   |
LL |         pub fn check_doc_lint() {} //~ ERROR missing documentation for an associated function
   |
note: the lint level is defined here
  --> /checkout/tests/ui/privacy/private-in-public-non-principal.rs:10:8
   |
   |
LL | #[deny(missing_docs)]
   |        ^^^^^^^^^^^^

warning: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl dyn PubPrincipal + PrivNonPrincipal {
LL | |         pub fn check_doc_lint() {} // OK, no missing doc lint
   | |_____^
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
error: aborting due to 1 previous error; 3 warnings emitted
------------------------------------------


rust-log-analyzer avatar Jan 27 '24 00:01 rust-log-analyzer

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_3c6341fe-7370-4dc0-a099-2df03edca061
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_3c6341fe-7370-4dc0-a099-2df03edca061
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=915d84458e5ebb8fb1dbafdf8b0fc5490ccf5840
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_3c6341fe-7370-4dc0-a099-2df03edca061
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_3c6341fe-7370-4dc0-a099-2df03edca061
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=915d84458e5ebb8fb1dbafdf8b0fc5490ccf5840
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
test result: ok. 951 passed; 1 ignored;


FAILED TEST: tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs (revision `default`)
command: CLIPPY_CONF_DIR="tests/ui-toml/undocumented_unsafe_blocks/default" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-88cd92e38577594d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-6d91538484033e4e.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-c555dfce7b7b4482.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-9cfde403f4813861.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-7f737c8175775d48.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-5a42172620baa7f7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-067e61b28e8c0ae8.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-56de3874fe91412c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-67f57c9d74692487.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-1ddd9d5371e89c55.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-0080dad30daeaebf.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-95373de42170edbf.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui-toml/undocumented_unsafe_blocks" "tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs" "--cfg=default" "--edition" "2021" "--extern" "proc_macro_unsafe=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/auxiliary/libproc_macro_unsafe.so" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/auxiliary"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr` to the actual output
--- tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.default.stderr
thread 'main' panicked at src/tools/clippy/tests/compile-test.rs:213:6:
called `Result::unwrap()` on an `Err` value: tests failed

Location:
Location:
    /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.21.2/src/lib.rs:388:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test compile-test`
 error: unsafe block missing a safety comment
... 310 lines skipped ...
    = help: consider adding a safety comment on the preceding line
 
-error: aborting due to 35 previous errors
-error: aborting due to 35 previous errors
+error: non local definition should be avoided as they go against expectation
 
+error: non local definition should be avoided as they go against expectation
+   |
+   |
+LL |     unsafe impl ImplInFn for (i32) {}
+   |
+   |
+   = help: move this declaration outside the of the 1 outermost bodies
+   = note: this may become deny-by-default in the Edition 2024 and higher
+error: aborting due to 37 previous errors
+



full stderr:
error: unsafe block missing a safety comment
   |
   |
LL |     /* Safety: */ unsafe {}
   |
   = help: consider adding a safety comment on the preceding line
   = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`
   = help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`

error: unsafe block missing a safety comment
   |
LL |     unsafe {}
   |     ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = (42, unsafe {}, "test", unsafe {});
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = (42, unsafe {}, "test", unsafe {});
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = *unsafe { &42 };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = match unsafe {} {
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = &unsafe {};
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe {}; 5];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |     let _ = unsafe {};
   |             ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |     t!(unsafe {});
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |             unsafe {}
   |             ^^^^^^^^^
...
...
LL |     t!();
   |     ---- in this macro invocation
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)

error: unsafe block missing a safety comment
   |
   |
LL |     unsafe {} // SAFETY:
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |     unsafe {
   |     ^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
LL |     unsafe {};
   |     ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |     println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
---

error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:357:9
   |
LL |         unsafe impl B for (u32) {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:378:13
   |
LL |             unsafe impl T for $t {}
...
...
LL |     no_safety_comment!(());
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)


error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
   |
LL |             unsafe impl T for $t {}
...
...
LL |     no_safety_comment!(());
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)


error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:411:5
   |
LL |     unsafe impl T for (i32) {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
   |
LL |             unsafe impl T for $t {}
...
...
LL |     no_safety_comment!(u32);
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)


error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:417:5
   |
LL |     unsafe impl T for (bool) {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:463:5
   |
LL |     unsafe impl NoComment for () {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:467:19
   |
LL |     /* SAFETY: */ unsafe impl InlineComment for () {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:471:5
   |
LL |     unsafe impl TrailingComment for () {} // SAFETY:
   |
   = help: consider adding a safety comment on the preceding line

error: constant item has unnecessary safety comment
error: constant item has unnecessary safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:475:5
   |
LL |     const BIG_NUMBER: i32 = 1000000;
   |
help: consider removing the safety comment
  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:474:5
   |
---

error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:483:5
   |
LL |     unsafe impl ImplInFn for () {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
---
   |
help: consider removing the safety comment
  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:504:5
   |
LL |     // SAFETY: this is more than one level away, so it should warn


error: unsafe block missing a safety comment
   |
LL |         if unsafe { true } {
   |            ^^^^^^^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
LL |             let bar = unsafe {};
   |                       ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: non local definition should be avoided as they go against expectation
   |
   |
LL |     unsafe impl ImplInFn for () {}
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
   = note: `-D non-local-definitions` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(non_local_definitions)]`

error: non local definition should be avoided as they go against expectation
   |
   |
LL |     unsafe impl ImplInFn for (i32) {}
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
error: aborting due to 37 previous errors


full stdout:
full stdout:



FAILED TEST: tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs (revision `disabled`)
command: CLIPPY_CONF_DIR="tests/ui-toml/undocumented_unsafe_blocks/disabled" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-88cd92e38577594d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-6d91538484033e4e.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-c555dfce7b7b4482.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-9cfde403f4813861.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-7f737c8175775d48.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-5a42172620baa7f7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-067e61b28e8c0ae8.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-56de3874fe91412c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-67f57c9d74692487.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-1ddd9d5371e89c55.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-0080dad30daeaebf.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-95373de42170edbf.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui-toml/undocumented_unsafe_blocks" "tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs" "--cfg=disabled" "--edition" "2021" "--extern" "proc_macro_unsafe=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/auxiliary/libproc_macro_unsafe.so" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui/auxiliary"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr` to the actual output
--- tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.disabled.stderr
+++ <stderr output>
 error: unsafe block missing a safety comment
... 390 lines skipped ...
    = help: consider adding a safety comment on the preceding line
 
-error: aborting due to 45 previous errors
-error: aborting due to 45 previous errors
+error: non local definition should be avoided as they go against expectation
 
+error: non local definition should be avoided as they go against expectation
+   |
+   |
+LL |     unsafe impl ImplInFn for (i32) {}
+   |
+   |
+   = help: move this declaration outside the of the 1 outermost bodies
+   = note: this may become deny-by-default in the Edition 2024 and higher
+error: aborting due to 47 previous errors
+



full stderr:
error: unsafe block missing a safety comment
   |
   |
LL |     /* Safety: */ unsafe {}
   |
   = help: consider adding a safety comment on the preceding line
   = note: `-D clippy::undocumented-unsafe-blocks` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`
   = help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`

error: unsafe block missing a safety comment
   |
LL |     unsafe {}
   |     ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = (42, unsafe {}, "test", unsafe {});
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = (42, unsafe {}, "test", unsafe {});
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = *unsafe { &42 };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = match unsafe {} {
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = &unsafe {};
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |     let _ = [unsafe {}; 5];
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |     let _ = unsafe {};
   |             ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |     t!(unsafe {});
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |             unsafe {}
   |             ^^^^^^^^^
...
...
LL |     t!();
   |     ---- in this macro invocation
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)

error: unsafe block missing a safety comment
   |
   |
LL |     unsafe {} // SAFETY:
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |     unsafe {
   |     ^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
LL |     unsafe {};
   |     ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |     println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
---

error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:357:9
   |
LL |         unsafe impl B for (u32) {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:378:13
   |
LL |             unsafe impl T for $t {}
...
...
LL |     no_safety_comment!(());
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)


error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
   |
LL |             unsafe impl T for $t {}
...
...
LL |     no_safety_comment!(());
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)


error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:411:5
   |
LL |     unsafe impl T for (i32) {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
   |
LL |             unsafe impl T for $t {}
...
...
LL |     no_safety_comment!(u32);
   |
   = help: consider adding a safety comment on the preceding line
   = note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)


error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:417:5
   |
LL |     unsafe impl T for (bool) {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:463:5
   |
LL |     unsafe impl NoComment for () {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:467:19
   |
LL |     /* SAFETY: */ unsafe impl InlineComment for () {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:471:5
   |
LL |     unsafe impl TrailingComment for () {} // SAFETY:
   |
   = help: consider adding a safety comment on the preceding line

error: constant item has unnecessary safety comment
error: constant item has unnecessary safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:475:5
   |
LL |     const BIG_NUMBER: i32 = 1000000;
   |
help: consider removing the safety comment
  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:474:5
   |
---

error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:483:5
   |
LL |     unsafe impl ImplInFn for () {}
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe impl missing a safety comment
error: unsafe impl missing a safety comment
##[error]  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:492:1
   |
LL | unsafe impl CrateRoot for () {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
LL |         unsafe {};
   |         ^^^^^^^^^
   |
---
   |
help: consider removing the safety comment
  --> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:504:5
   |
LL |     // SAFETY: this is more than one level away, so it should warn


error: unsafe block missing a safety comment
   |
LL |         if unsafe { true } {
   |            ^^^^^^^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
LL |             let bar = unsafe {};
   |                       ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |         unsafe { a_function_with_a_very_long_name_to_break_the_line() };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |         unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |         unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |     unsafe {}
   |     ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
LL |     unsafe {
   |     ^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: unsafe block missing a safety comment
   |
   |
LL |         unsafe { a_function_with_a_very_long_name_to_break_the_line() };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |         unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
   |
LL |         unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
   |
   = help: consider adding a safety comment on the preceding line


error: unsafe block missing a safety comment
   |
LL |     unsafe {}
   |     ^^^^^^^^^
   |
   |
   = help: consider adding a safety comment on the preceding line

error: non local definition should be avoided as they go against expectation
   |
   |
LL |     unsafe impl ImplInFn for () {}
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
   = note: `-D non-local-definitions` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(non_local_definitions)]`

error: non local definition should be avoided as they go against expectation
   |
   |
LL |     unsafe impl ImplInFn for (i32) {}
   |
   |
   = help: move this declaration outside the of the 1 outermost bodies
   = note: this may become deny-by-default in the Edition 2024 and higher
error: aborting due to 47 previous errors


full stdout:
---

Build completed unsuccessfully in 0:01:49


command did not execute successfully: cd "/checkout" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_unknown_linux_gnu="ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="true" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="true" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools" CC_x86_64_unknown_linux_gnu="sccache cc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.77.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.77.0" CFG_VERSION="1.77.0-nightly (915d84458 2024-01-27)" CFG_VER_DATE="2024-01-27" CFG_VER_HASH="915d84458e5ebb8fb1dbafdf8b0fc5490ccf5840" CFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXXFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXX_x86_64_unknown_linux_gnu="sccache c++" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" HOST_LIBS="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" LIBC_CHECK_CFG="1" LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/lib" LIBZ_SYS_STATIC="1" LZMA_API_STATIC="1" RANLIB_x86_64_unknown_linux_gnu="ar s" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/native" RUSTC="/checkout/obj/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/checkout/obj/build/tmp/extended-error-metadata" RUSTC_HOST_FLAGS="-Zunstable-options --check-cfg=cfg(bootstrap)" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Dwarnings" RUSTC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_STAGE="2" RUSTC_SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" RUSTC_TEST_SUITE="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/checkout/obj/build/bootstrap/debug/rustc" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.77.0-nightly\t(915d84458\t2024-01-27)" RUSTDOC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTDOC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Csplit-debuginfo=off -Zunstable-options" RUST_TEST_THREADS="16" SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" TERM="xterm" __CARGO_DEFAULT_LIB_METADATA="nightlytool-rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "-Zcheck-cfg" "-Zbinary-dep-depinfo" "-j" "16" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/clippy/Cargo.toml" "--" "--quiet"

stdout ----

stderr ----

rust-log-analyzer avatar Jan 27 '24 12:01 rust-log-analyzer

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_9382137f-61c6-44e2-a4a5-7f9c179f3ab3
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_9382137f-61c6-44e2-a4a5-7f9c179f3ab3
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=bf2a7652409a1c6083f5f0e3b37363510908a2a6
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_9382137f-61c6-44e2-a4a5-7f9c179f3ab3
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_9382137f-61c6-44e2-a4a5-7f9c179f3ab3
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=bf2a7652409a1c6083f5f0e3b37363510908a2a6
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
 Documenting rustc_passes v0.0.0 (/checkout/compiler/rustc_passes)
error: unclosed HTML tag `Bar`
   --> compiler/rustc_lint/src/non_local_def.rs:123:35
    |
123 | ///    std::convert::PartialEq<Foo<Bar>>
    |
    = note: `-D rustdoc::invalid-html-tags` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(rustdoc::invalid_html_tags)]`
help: try marking as source code
help: try marking as source code
    |
123 | ///    `std::convert::PartialEq<Foo<Bar>>`

error: could not document `rustc_lint`

Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2021 --crate-type lib --crate-name rustc_lint compiler/rustc_lint/src/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/doc -Zunstable-options --check-cfg 'cfg()' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=dc4614138a67e97b -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps --extern rustc_ast=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_ast-10314c749b8049f3.rmeta --extern rustc_ast_pretty=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_ast_pretty-63603786fb12c01b.rmeta --extern rustc_attr=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_attr-b71aa285415329af.rmeta --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-1d339e608f97ffbe.rmeta --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-380b0d8eb5e0794f.rmeta --extern rustc_feature=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_feature-03da752995cf1376.rmeta --extern rustc_fluent_macro=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps/librustc_fluent_macro-bd0b9a43da1a5013.so --extern rustc_hir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_hir-686b1f39b3ed8d97.rmeta --extern rustc_index=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_index-afe9c0792f491de8.rmeta --extern rustc_infer=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_infer-2474725afaa43c2b.rmeta --extern rustc_macros=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/deps/librustc_macros-7dd31ffb1c7715cf.so --extern rustc_middle=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_middle-bb29823b836081c3.rmeta --extern rustc_parse_format=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_parse_format-1e1d2a85782ca57c.rmeta --extern rustc_session=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_session-0c4da8c64897d9f0.rmeta --extern rustc_span=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-233439e43f17ee70.rmeta --extern rustc_target=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-853c4ed5a4a889bf.rmeta --extern rustc_trait_selection=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_trait_selection-6fec40345dcf667b.rmeta --extern rustc_type_ir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_type_ir-9293601a3feb4b7f.rmeta --extern tracing=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing-5f701b99da500b8b.rmeta --extern unicode_security=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/libunicode_security-f6b3d81ec1080116.rmeta --extern-html-root-url 'tracing=https://docs.rs/tracing/0.1.37/' --extern-html-root-url 'unicode_security=https://docs.rs/unicode-security/0.1.0/' -Zunstable-options --cfg=bootstrap --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=cfg(bootstrap)' '--check-cfg=cfg(parallel_compiler)' '--check-cfg=cfg(no_btreemap_remove_entry)' '--check-cfg=cfg(crossbeam_loom)' '--check-cfg=cfg(span_locations)' '--check-cfg=cfg(rustix_use_libc)' '--check-cfg=cfg(emulate_second_only_system)' '--check-cfg=cfg(windows_raw_dylib)' --document-private-items --document-hidden-items -Dwarnings '-Wrustdoc::invalid_codeblock_attributes' --crate-version '1.77.0-nightly (bf2a76524 2024-01-27)' --document-private-items '-Arustdoc::private-intra-doc-links' --enable-index-page -Zunstable-options -Znormalize-docs --show-type-layout --generate-link-to-definition '-Zcrate-attr=warn(rust_2018_idioms)' --cfg=parallel_compiler --extern-html-root-url 'ena=https://docs.rs/ena/latest/'` (exit status: 1)
Build completed unsuccessfully in 0:01:09
  local time: Sat Jan 27 12:57:52 UTC 2024
  network time: Sat, 27 Jan 2024 12:57:53 GMT
##[error]Process completed with exit code 1.

rust-log-analyzer avatar Jan 27 '24 12:01 rust-log-analyzer

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_af08155a-9834-463a-a721-88354ac57b5e
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_af08155a-9834-463a-a721-88354ac57b5e
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=f39c6042a888c714bd1d9bf0dc5f4f562ae57f1b
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_af08155a-9834-463a-a721-88354ac57b5e
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_af08155a-9834-463a-a721-88354ac57b5e
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=f39c6042a888c714bd1d9bf0dc5f4f562ae57f1b
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s


FAILED TEST: tests/ui/bool_comparison.rs
command: CLIPPY_CONF_DIR="tests" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-88cd92e38577594d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-6d91538484033e4e.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-c555dfce7b7b4482.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-9cfde403f4813861.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-7f737c8175775d48.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-5a42172620baa7f7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-067e61b28e8c0ae8.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-56de3874fe91412c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-67f57c9d74692487.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-1ddd9d5371e89c55.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-0080dad30daeaebf.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-95373de42170edbf.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/bool_comparison.rs" "--edition" "2021"
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/bool_comparison.stderr` to the actual output
thread 'main' panicked at src/tools/clippy/tests/compile-test.rs:173:6:
called `Result::unwrap()` on an `Err` value: tests failed
called `Result::unwrap()` on an `Err` value: tests failed

Location:
    /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.21.2/src/lib.rs:388:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: test failed, to rerun pass `--test compile-test`
--- tests/ui/bool_comparison.stderr
+++ <stderr output>
 error: equality checks against true are unnecessary
... 149 lines skipped ...
... 149 lines skipped ...
    |              ^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `(1 < 2) != m!(func)`
-error: aborting due to 25 previous errors
-error: aborting due to 25 previous errors
+error: non local definition should be avoided as they go against expectation
 
+error: non local definition should be avoided as they go against expectation
+   |
+   |
+LL | /     impl PartialOrd<Foo> for bool {
+LL | |         fn partial_cmp(&self, _: &Foo) -> Option<std::cmp::Ordering> {
+LL | |         }
+LL | |     }
+   | |_____^
+   |
---
+


full stderr:
error: equality checks against true are unnecessary
   |
   |
LL |     if x == true {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
   = note: `-D clippy::bool-comparison` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::bool_comparison)]`

error: equality checks against false can be replaced by a negation
error: equality checks against false can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:12:8
   |
LL |     if x == false {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`

error: equality checks against true are unnecessary
   |
LL |     if true == x {
LL |     if true == x {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
error: equality checks against false can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:22:8
   |
   |
LL |     if false == x {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against true can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:27:8
   |
   |
LL |     if x != true {
   |        ^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against false are unnecessary
##[error]  --> tests/ui/bool_comparison.rs:32:8
   |
LL |     if x != false {
LL |     if x != false {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `x`
error: inequality checks against true can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:37:8
   |
LL |     if true != x {
LL |     if true != x {
   |        ^^^^^^^^^ help: try simplifying it as shown: `!x`
error: inequality checks against false are unnecessary
##[error]  --> tests/ui/bool_comparison.rs:42:8
   |
LL |     if false != x {
LL |     if false != x {
   |        ^^^^^^^^^^ help: try simplifying it as shown: `x`
error: less than comparison against true can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:47:8
   |
   |
LL |     if x < true {
   |        ^^^^^^^^ help: try simplifying it as shown: `!x`

error: greater than checks against false are unnecessary
   |
   |
LL |     if false < x {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`

error: greater than checks against false are unnecessary
   |
   |
LL |     if x > false {
   |        ^^^^^^^^^ help: try simplifying it as shown: `x`
error: less than comparison against true can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:62:8
   |
   |
LL |     if true > x {
   |        ^^^^^^^^ help: try simplifying it as shown: `!x`

error: order comparisons between booleans can be simplified
   |
   |
LL |     if x < y {
   |        ^^^^^ help: try simplifying it as shown: `!x & y`

error: order comparisons between booleans can be simplified
   |
   |
LL |     if x > y {
   |        ^^^^^ help: try simplifying it as shown: `x & !y`
error: this comparison might be written more concisely
##[error]  --> tests/ui/bool_comparison.rs:121:8
   |
   |
LL |     if a == !b {};
   |        ^^^^^^^ help: try simplifying it as shown: `a != b`
error: this comparison might be written more concisely
##[error]  --> tests/ui/bool_comparison.rs:122:8
   |
   |
LL |     if !a == b {};
   |        ^^^^^^^ help: try simplifying it as shown: `a != b`
error: this comparison might be written more concisely
##[error]  --> tests/ui/bool_comparison.rs:126:8
   |
   |
LL |     if b == !a {};
   |        ^^^^^^^ help: try simplifying it as shown: `b != a`
error: this comparison might be written more concisely
##[error]  --> tests/ui/bool_comparison.rs:127:8
   |
   |
LL |     if !b == a {};
   |        ^^^^^^^ help: try simplifying it as shown: `b != a`
error: equality checks against false can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:151:8
   |
   |
LL |     if false == m!(func) {}
   |        ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
error: equality checks against false can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:152:8
   |
   |
LL |     if m!(func) == false {}
   |        ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`

error: equality checks against true are unnecessary
   |
   |
LL |     if true == m!(func) {}
   |        ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`

error: equality checks against true are unnecessary
   |
   |
LL |     if m!(func) == true {}
   |        ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `m!(func)`
error: equality checks against false can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:171:14
   |
   |
LL |     let _ = ((1 < 2) == false) as usize;
   |              ^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `1 >= 2`
error: equality checks against false can be replaced by a negation
##[error]  --> tests/ui/bool_comparison.rs:172:14
   |
   |
LL |     let _ = (false == m!(func)) as usize;
   |              ^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!m!(func)`
error: this comparison might be written more concisely
##[error]  --> tests/ui/bool_comparison.rs:175:14
   |
   |
LL |     let _ = ((1 < 2) == !m!(func)) as usize;
   |              ^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `(1 < 2) != m!(func)`

error: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl PartialEq<Foo> for bool {
LL | |         fn eq(&self, _: &Foo) -> bool {
LL | |         }
LL | |     }
   | |_____^
   |
   |
   = help: move this declaration outside the of the current body
   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
   = note: `-D non-local-definitions` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(non_local_definitions)]`

error: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl PartialOrd<Foo> for bool {
LL | |         fn partial_cmp(&self, _: &Foo) -> Option<std::cmp::Ordering> {
LL | |         }
LL | |     }
   | |_____^
   |
---



FAILED TEST: tests/ui/needless_borrow.rs
command: CLIPPY_CONF_DIR="tests" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/clippy-driver" "--error-format=json" "--emit=metadata" "-Aunused" "-Ainternal_features" "-Zui-testing" "-Dwarnings" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps" "--extern=clippy_config=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_config-88cd92e38577594d.rlib" "--extern=clippy_lints=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_lints-6d91538484033e4e.rlib" "--extern=clippy_utils=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libclippy_utils-c555dfce7b7b4482.rlib" "--extern=futures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libfutures-9cfde403f4813861.rlib" "--extern=if_chain=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libif_chain-ae846d6788d6a9f1.rlib" "--extern=itertools=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libitertools-7f737c8175775d48.rlib" "--extern=parking_lot=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libparking_lot-5a42172620baa7f7.rlib" "--extern=quote=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libquote-067e61b28e8c0ae8.rlib" "--extern=regex=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libregex-56de3874fe91412c.rlib" "--extern=serde=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libserde-67f57c9d74692487.rlib" "--extern=serde_derive=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/libserde_derive-1ddd9d5371e89c55.so" "--extern=syn=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libsyn-0080dad30daeaebf.rlib" "--extern=tokio=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libtokio-95373de42170edbf.rlib" "-Ldependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release/deps" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui_test/tests/ui" "tests/ui/needless_borrow.rs" "--edition" "2021"
error: actual output differed from expected
error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/needless_borrow.stderr` to the actual output
--- tests/ui/needless_borrow.stderr
 error: this expression creates a reference which is immediately dereferenced by the compiler
   --> $DIR/needless_borrow.rs:15:15
... 155 lines skipped ...
... 155 lines skipped ...
    |                      ^^^^^^^^^^^^^^ help: change this to: `{ x.u }`
-error: aborting due to 26 previous errors
-error: aborting due to 26 previous errors
+error: non local definition should be avoided as they go against expectation
 
+error: non local definition should be avoided as they go against expectation
+   |
+   |
+LL | /     impl From<&S> for u32 {
+LL | |         fn from(s: &S) -> Self {
+LL | |         }
+LL | |     }
+   | |_____^
+   |
---
full stderr:
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:15:15
   |
LL |     let _ = x(&&a); // warn
   |               ^^^ help: change this to: `&a`
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`

error: this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:19:13
   |
LL |     mut_ref(&mut &mut b); // warn
   |             ^^^^^^^^^^^ help: change this to: `&mut b`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:31:13
   |
LL |             &&a
---

error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:39:27
   |
LL |                     break &ref_a;
   |                           ^^^^^^ help: change this to: `ref_a`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:46:15
   |
   |
LL |     let _ = x(&&&a);
   |               ^^^^ help: change this to: `&a`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:47:15
   |
   |
LL |     let _ = x(&mut &&a);
   |               ^^^^^^^^ help: change this to: `&a`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:48:15
   |
   |
LL |     let _ = x(&&&mut b);
   |               ^^^^^^^^ help: change this to: `&mut b`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:49:15
   |
   |
LL |     let _ = x(&&ref_a);
   |               ^^^^^^^ help: change this to: `ref_a`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:52:11
   |
   |
LL |         x(&b);
   |           ^^ help: change this to: `b`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:59:13
   |
LL |     mut_ref(&mut x);
---

error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:61:23
   |
LL |     let y: &mut i32 = &mut x;
   |                       ^^^^^^ help: change this to: `x`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:62:23
   |
   |
LL |     let y: &mut i32 = &mut &mut x;
   |                       ^^^^^^^^^^^ help: change this to: `x`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:71:14
   |
LL |         0 => &mut x,
---
   |
LL |         0 => &mut x,
   |              ^^^^^^ help: change this to: `x`

error: this expression borrows a value the compiler would automatically borrow
   |
   |
LL |     let _ = (&x).0;
   |             ^^^^ help: change this to: `x`

error: this expression borrows a value the compiler would automatically borrow
   |
   |
LL |     let _ = unsafe { (&*x).0 };
   |                      ^^^^^ help: change this to: `(*x)`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:101:5
   |
   |
LL |     (&&()).foo();
   |     ^^^^^^ help: change this to: `(&())`
error: this expression creates a reference which is immediately dereferenced by the compiler
##[error]  --> tests/ui/needless_borrow.rs:110:5
   |
   |
LL |     (&&5).foo();
   |     ^^^^^ help: change this to: `(&5)`

error: this expression borrows a value the compiler would automatically borrow
   |
   |
LL |             (&self.f)()
   |             ^^^^^^^^^ help: change this to: `(self.f)`

error: this expression borrows a value the compiler would automatically borrow
   |
LL |             (&mut self.f)()
LL |             (&mut self.f)()
   |             ^^^^^^^^^^^^^ help: change this to: `(self.f)`

error: this expression borrows a value the compiler would automatically borrow
   |
   |
LL |         let _ = &mut (&mut { x.u }).x;
   |                      ^^^^^^^^^^^^^^ help: change this to: `{ x.u }`

error: this expression borrows a value the compiler would automatically borrow
   |
   |
LL |         let _ = &mut (&mut { x.u }).x;
   |                      ^^^^^^^^^^^^^^ help: change this to: `{ x.u }`

error: this expression borrows a value the compiler would automatically borrow
   |
   |
LL |         let _ = &mut (&mut x.u).x;
   |                      ^^^^^^^^^^ help: change this to: `x.u`

error: this expression borrows a value the compiler would automatically borrow
   |
   |
LL |         let _ = &mut (&mut { x.u }).x;
   |                      ^^^^^^^^^^^^^^ help: change this to: `{ x.u }`

error: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl From<S> for u32 {
LL | |         fn from(s: S) -> Self {
LL | |             (&s).into()
LL | |     }
   | |_____^
   |
   = help: move this declaration outside the of the current body
   = help: move this declaration outside the of the current body
   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
   = note: `-D non-local-definitions` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(non_local_definitions)]`

error: non local definition should be avoided as they go against expectation
   |
   |
LL | /     impl From<&S> for u32 {
LL | |         fn from(s: &S) -> Self {
LL | |         }
LL | |     }
   | |_____^
   |
---

Build completed unsuccessfully in 0:01:48


command did not execute successfully: cd "/checkout" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_unknown_linux_gnu="ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="true" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="true" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools" CC_x86_64_unknown_linux_gnu="sccache cc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.77.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.77.0" CFG_VERSION="1.77.0-nightly (f39c6042a 2024-01-27)" CFG_VER_DATE="2024-01-27" CFG_VER_HASH="f39c6042a888c714bd1d9bf0dc5f4f562ae57f1b" CFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXXFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXX_x86_64_unknown_linux_gnu="sccache c++" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" HOST_LIBS="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" LIBC_CHECK_CFG="1" LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/lib" LIBZ_SYS_STATIC="1" LZMA_API_STATIC="1" RANLIB_x86_64_unknown_linux_gnu="ar s" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/native" RUSTC="/checkout/obj/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/checkout/obj/build/tmp/extended-error-metadata" RUSTC_HOST_FLAGS="-Zunstable-options --check-cfg=cfg(bootstrap)" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Dwarnings" RUSTC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_STAGE="2" RUSTC_SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" RUSTC_TEST_SUITE="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/checkout/obj/build/bootstrap/debug/rustc" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.77.0-nightly\t(f39c6042a\t2024-01-27)" RUSTDOC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTDOC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Csplit-debuginfo=off -Zunstable-options" RUST_TEST_THREADS="16" SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" TERM="xterm" __CARGO_DEFAULT_LIB_METADATA="nightlytool-rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "-Zcheck-cfg" "-Zbinary-dep-depinfo" "-j" "16" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/clippy/Cargo.toml" "--" "--quiet"

stdout ----

stderr ----

rust-log-analyzer avatar Jan 27 '24 14:01 rust-log-analyzer

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_7a16adae-c008-475e-9739-33253e7e5999
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_7a16adae-c008-475e-9739-33253e7e5999
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=07a2c9771165d0890ccd8b43720083f87a67d763
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_7a16adae-c008-475e-9739-33253e7e5999
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_7a16adae-c008-475e-9739-33253e7e5999
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=07a2c9771165d0890ccd8b43720083f87a67d763
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---

FAILED TEST: tests/ui/bool_comparison.rs
command: "checking tests/ui/bool_comparison.rs"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/bool_comparison.fixed` to the actual output
--- tests/ui/bool_comparison.fixed
+++ <fixed output>
called `Result::unwrap()` on an `Err` value: tests failed

Location:
    /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.21.2/src/lib.rs:388:13
    /cargo/registry/src/index.crates.io-6f17d22bba15001f/ui_test-0.21.2/src/lib.rs:388:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
-#![allow(clippy::needless_if)]
+#![allow(non_local_definitions, clippy::needless_if)]
 #![warn(clippy::bool_comparison)]
... 171 lines skipped ...
... 171 lines skipped ...
     let _ = ((1 < 2) != m!(func)) as usize;


full stderr:


full stdout:



FAILED TEST: tests/ui/needless_borrow.rs
command: "checking tests/ui/needless_borrow.rs"

error: actual output differed from expected
Execute `cargo uibless` to update `tests/ui/needless_borrow.fixed` to the actual output
--- tests/ui/needless_borrow.fixed
+++ <fixed output>
 #![feature(lint_reasons)]
-    unused,
+    unused, non_local_definitions,
     clippy::uninlined_format_args,
     clippy::unnecessary_mut_passed,
---

error: test failed, to rerun pass `--test compile-test`


command did not execute successfully: cd "/checkout" && env -u MAKEFLAGS -u MFLAGS AR_x86_64_unknown_linux_gnu="ar" CARGO_INCREMENTAL="0" CARGO_PROFILE_RELEASE_DEBUG="0" CARGO_PROFILE_RELEASE_DEBUG_ASSERTIONS="true" CARGO_PROFILE_RELEASE_OVERFLOW_CHECKS="true" CARGO_PROFILE_RELEASE_STRIP="false" CARGO_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools" CC_x86_64_unknown_linux_gnu="sccache cc" CFG_COMPILER_BUILD_TRIPLE="x86_64-unknown-linux-gnu" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.77.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.77.0" CFG_VERSION="1.77.0-nightly (07a2c9771 2024-01-27)" CFG_VER_DATE="2024-01-27" CFG_VER_HASH="07a2c9771165d0890ccd8b43720083f87a67d763" CFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXXFLAGS_x86_64_unknown_linux_gnu="-ffunction-sections -fdata-sections -fPIC -m64" CXX_x86_64_unknown_linux_gnu="sccache c++" DOC_RUST_LANG_ORG_CHANNEL="https://doc.rust-lang.org/nightly" HOST_LIBS="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/release" LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" LIBC_CHECK_CFG="1" LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm/lib" LIBZ_SYS_STATIC="1" LZMA_API_STATIC="1" RANLIB_x86_64_unknown_linux_gnu="ar s" REAL_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" RUSTBUILD_NATIVE_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/native" RUSTC="/checkout/obj/build/bootstrap/debug/rustc" RUSTC_BOOTSTRAP="1" RUSTC_BREAK_ON_ICE="1" RUSTC_ERROR_METADATA_DST="/checkout/obj/build/tmp/extended-error-metadata" RUSTC_HOST_FLAGS="-Zunstable-options --check-cfg=cfg(bootstrap)" RUSTC_INSTALL_BINDIR="bin" RUSTC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LIB_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_LINT_FLAGS="-Wrust_2018_idioms -Wunused_lifetimes -Dwarnings" RUSTC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_SNAPSHOT_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTC_STAGE="2" RUSTC_SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" RUSTC_TEST_SUITE="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" RUSTC_TLS_MODEL_INITIAL_EXEC="1" RUSTC_VERBOSE="0" RUSTC_WRAPPER="/checkout/obj/build/bootstrap/debug/rustc" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.77.0-nightly\t(07a2c9771\t2024-01-27)" RUSTDOC_LIBDIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" RUSTDOC_REAL="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap) --check-cfg=cfg(parallel_compiler) --check-cfg=cfg(rust_analyzer) --check-cfg=cfg(no_btreemap_remove_entry) --check-cfg=cfg(crossbeam_loom) --check-cfg=cfg(span_locations) --check-cfg=cfg(rustix_use_libc) --check-cfg=cfg(emulate_second_only_system) --check-cfg=cfg(windows_raw_dylib) -Zmacro-backtrace -Clink-args=-Wl,-z,origin -Clink-args=-Wl,-rpath,$ORIGIN/../lib -Csplit-debuginfo=off -Zunstable-options" RUST_TEST_THREADS="16" SYSROOT="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" TERM="xterm" __CARGO_DEFAULT_LIB_METADATA="nightlytool-rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "--release" "-Zcheck-cfg" "-Zbinary-dep-depinfo" "-j" "16" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/clippy/Cargo.toml" "--" "--quiet"
Build completed unsuccessfully in 0:01:48

stdout ----

rust-log-analyzer avatar Jan 27 '24 15:01 rust-log-analyzer

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_d70c0d30-e23e-4ef0-ba73-dca3288654a3
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_d70c0d30-e23e-4ef0-ba73-dca3288654a3
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=029b74efd40e50b4daf2a83dbc7cdf0115bf2c81
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_d70c0d30-e23e-4ef0-ba73-dca3288654a3
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_d70c0d30-e23e-4ef0-ba73-dca3288654a3
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=029b74efd40e50b4daf2a83dbc7cdf0115bf2c81
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Sat Jan 27 15:47:09 UTC 2024
  network time: Sat, 27 Jan 2024 15:47:09 GMT
  network time: Sat, 27 Jan 2024 15:47:09 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
##[endgroup]
Testing GCC stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
    Finished release [optimized] target(s) in 1.36s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --no-default-features --mini-tests --std-tests`
Using system GCC
Using system GCC
[BUILD] example
[AOT] mini_core_hello_world
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core_hello_world
abc
---
   Compiling rand v0.8.5
   Compiling core v0.0.0 (/checkout/library/core)
   Compiling alloc v0.0.0 (/checkout/library/alloc)
   Compiling std v0.0.0 (/checkout/library/std)
error: non local definition should be avoided as they go against expectation
    |
    |
206 | /     impl From<MyNeverToken> for ! {
207 | |         fn from(never: MyNeverToken) -> ! {
208 | |             match never {}
210 | |     }
    | |_____^
    |
    = help: move this declaration outside the of the current body
    = help: move this declaration outside the of the current body
    = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `-D non-local-definitions` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(non_local_definitions)]`

error: non local definition should be avoided as they go against expectation
    |
    |
228 | /     impl From<MyNeverToken> for ! {
229 | |         fn from(never: MyNeverToken) -> ! {
230 | |             match never {}
232 | |     }
    | |_____^
    |
    = help: move this declaration outside the of the current body

rust-log-analyzer avatar Jan 27 '24 16:01 rust-log-analyzer

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ACTION=__run_7
GITHUB_ACTIONS=true
GITHUB_ACTION_REF=
GITHUB_ACTION_REPOSITORY=
GITHUB_ACTOR=Urgau
GITHUB_API_URL=https://api.github.com
GITHUB_BASE_REF=master
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_e4e56074-40b9-4e07-92c8-36e563993bb0
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rfc3373-non-local-defs
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_e4e56074-40b9-4e07-92c8-36e563993bb0
GITHUB_REF=refs/pull/120393/merge
GITHUB_REF_NAME=120393/merge
GITHUB_REF_PROTECTED=false
---
GITHUB_SERVER_URL=https://github.com
GITHUB_SHA=0ac5aee26461db5806a0c17044312ae812efab4e
GITHUB_STATE=/home/runner/work/_temp/_runner_file_commands/save_state_e4e56074-40b9-4e07-92c8-36e563993bb0
GITHUB_STEP_SUMMARY=/home/runner/work/_temp/_runner_file_commands/step_summary_e4e56074-40b9-4e07-92c8-36e563993bb0
GITHUB_TRIGGERING_ACTOR=Urgau
GITHUB_WORKFLOW_REF=rust-lang/rust/.github/workflows/ci.yml@refs/pull/120393/merge
GITHUB_WORKFLOW_SHA=0ac5aee26461db5806a0c17044312ae812efab4e
GITHUB_WORKSPACE=/home/runner/work/rust/rust
GOROOT_1_19_X64=/opt/hostedtoolcache/go/1.19.13/x64
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Sat Jan 27 16:44:00 UTC 2024
  network time: Sat, 27 Jan 2024 16:44:01 GMT
  network time: Sat, 27 Jan 2024 16:44:01 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
##[endgroup]
Testing GCC stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling y v0.1.0 (/checkout/compiler/rustc_codegen_gcc/build_system)
    Finished release [optimized] target(s) in 1.35s
     Running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-codegen/x86_64-unknown-linux-gnu/release/y test --use-system-gcc --use-backend gcc --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc --release --no-default-features --mini-tests --std-tests`
Using system GCC
Using system GCC
[BUILD] example
[AOT] mini_core_hello_world
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core_hello_world
abc
---
   Compiling rustdoc-json-types v0.1.0 (/checkout/src/rustdoc-json-types)
   Compiling askama_derive v0.12.5
   Compiling askama v0.12.1
   Compiling rustdoc v0.0.0 (/checkout/src/librustdoc)
error: non local definition should be avoided as they go against expectation
   --> src/librustdoc/html/markdown/tests.rs:483:9
483 | /         impl crate::doctest::Tester for Vec<usize> {
483 | /         impl crate::doctest::Tester for Vec<usize> {
484 | |             fn add_test(&mut self, _test: String, _config: LangString, line: usize) {
485 | |                 self.push(line);
487 | |         }
    | |_________^
    |
    |
    = help: move this declaration outside the of the 2 outermost bodies
    = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
    = note: `-D non-local-definitions` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(non_local_definitions)]`
error: could not compile `rustdoc` (lib test) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:28:11
  local time: Sat Jan 27 17:12:49 UTC 2024

rust-log-analyzer avatar Jan 27 '24 17:01 rust-log-analyzer

@rustbot ready

Urgau avatar Jan 28 '24 14:01 Urgau

rustc_macros::diagnostics was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged. Otherwise, you can ignore this comment.

rustbot avatar Jan 29 '24 18:01 rustbot

@rustbot ready

Urgau avatar Jan 29 '24 19:01 Urgau

@bors try

WaffleLapkin avatar Jan 29 '24 23:01 WaffleLapkin

:hourglass: Trying commit a6faefc4c6f8bac1fd569fd74865eb185e647dba with merge 7622c0f807a4e13c4db886a1681bf343795692df...

bors avatar Jan 30 '24 00:01 bors

:sunny: Try build successful - checks-actions Build commit: 7622c0f807a4e13c4db886a1681bf343795692df (7622c0f807a4e13c4db886a1681bf343795692df)

bors avatar Jan 30 '24 01:01 bors

@craterbot check start=master#5518eaa946291f00471af8b254b2a1715f234882 end=try#7622c0f807a4e13c4db886a1681bf343795692df+rustflags=-Dnon_local_definitions

WaffleLapkin avatar Jan 30 '24 21:01 WaffleLapkin

:ok_hand: Experiment pr-120393 created and queued. :mag: You can check out the queue and this experiment's details.

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 30 '24 21:01 craterbot

:construction: Experiment pr-120393 is now running

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Jan 31 '24 13:01 craterbot

:tada: Experiment pr-120393 is completed! :bar_chart: 7057 regressed and 4 fixed (412562 total) :newspaper: Open the full report.

:warning: If you notice any spurious failure please add them to the blacklist! :information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Feb 02 '24 10:02 craterbot

@Urgau can you summarize crater run for T-lang to discuss in a future meeting?

I've looked for a little bit, looks like the only interesting category is regressed — all other are just noise unrelated to this lint. The problem though is that this regressed (= linted on) 7k crates, so I have no idea how you could analyze this without automation...

From my crude look it seems like most of the cases are caused by derives using synstructure without https://github.com/mystor/synstructure/pull/62 that was just merged. Maybe there is some way to filter those cases out, so you can see other cases?

WaffleLapkin avatar Feb 02 '24 11:02 WaffleLapkin

@craterbot check start=master#5518eaa946291f00471af8b254b2a1715f234882 end=try#7622c0f807a4e13c4db886a1681bf343795692df+rustflags=-Dnon_local_definitions crates=https://crater-reports.s3.amazonaws.com/pr-120393/retry-regressed-list.txt p1

WaffleLapkin avatar Feb 02 '24 12:02 WaffleLapkin

:rotating_light: Error: failed to parse the command

:sos: If you have any trouble with Crater please ping @rust-lang/infra! :information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Feb 02 '24 12:02 craterbot

@craterbot check start=master#5518eaa946291f00471af8b254b2a1715f234882 end=try#7622c0f807a4e13c4db886a1681bf343795692df+rustflags=-Dnon_local_definitions crates=https://crater-reports.s3.amazonaws.com/pr-120393/retry-regressed-list.txt p=1

WaffleLapkin avatar Feb 02 '24 12:02 WaffleLapkin

:ok_hand: Experiment pr-120393-1 created and queued. :mag: You can check out the queue and this experiment's details.

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Feb 02 '24 12:02 craterbot

:construction: Experiment pr-120393-1 is now running

:information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Feb 02 '24 12:02 craterbot

:tada: Experiment pr-120393-1 is completed! :bar_chart: 6985 regressed and 0 fixed (7057 total) :newspaper: Open the full report.

:warning: If you notice any spurious failure please add them to the blacklist! :information_source: Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

craterbot avatar Feb 02 '24 13:02 craterbot