rust icon indicating copy to clipboard operation
rust copied to clipboard

Make traits / trait methods detected by the dead code lint

Open mu001999 opened this issue 1 year ago • 81 comments
trafficstars

Fixes #118139 and #41883

mu001999 avatar Nov 24 '23 19:11 mu001999

r? @wesleywiser

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

rustbot avatar Nov 24 '23 19:11 rustbot

BTW, the new behavior helps me finding an unused struct, see #118258, when I built firstly without checking edition.

mu001999 avatar Nov 24 '23 19:11 mu001999

  1. This change would affect many tests and current codes, the checking of edition is just a temporary solution. Are there any better solutions?

Does it manly just affect tests? If that's the case we can just put #[allow] in them.

In any case could you post (via pastebin or something else, since GitHub will probably limit you) the full output of the new warnings. So we can get a sense of scale of new warnings.

Urgau avatar Nov 24 '23 19:11 Urgau

Does it manly just affect tests? If that's the case we can just put #[allow] in them.

Ui tests allow unused code lint by default. So there is nothing to do on most.

cjgillot avatar Nov 25 '23 01:11 cjgillot

This change would affect many tests and current codes

In #92790 / #95977, I also caused a lot of new warnings to show up :-) There we started the lint as allow-by-default (and appear to still treat it as such... I should look into that).

Perhaps we start the same way here?

shepmaster avatar Nov 25 '23 03:11 shepmaster

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/compiler/rustc_ast_lowering)
   Compiling rustc_monomorphize v0.0.0 (/checkout/compiler/rustc_monomorphize)
   Compiling rustc_query_impl v0.0.0 (/checkout/compiler/rustc_query_impl)
   Compiling rustc_smir v0.0.0 (/checkout/compiler/rustc_smir)
error: struct `UniversallyQuantified` is never constructed
   --> compiler/rustc_infer/src/infer/nll_relate/mod.rs:117:8
    |
117 | struct UniversallyQuantified(bool);
    |
    |
    = note: `UniversallyQuantified` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`
error: could not compile `rustc_infer` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:07:35
  local time: Sat Nov 25 07:04:41 UTC 2023

rust-log-analyzer avatar Nov 25 '23 07:11 rust-log-analyzer

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/compiler/rustc_ast_lowering)
   Compiling rustc_smir v0.0.0 (/checkout/compiler/rustc_smir)
   Compiling rustc_codegen_ssa v0.0.0 (/checkout/compiler/rustc_codegen_ssa)
   Compiling rustc_resolve v0.0.0 (/checkout/compiler/rustc_resolve)
error: struct `UniversallyQuantified` is never constructed
   --> compiler/rustc_infer/src/infer/nll_relate/mod.rs:117:8
    |
117 | struct UniversallyQuantified(bool);
    |
    |
    = note: `UniversallyQuantified` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`
error: could not compile `rustc_infer` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:07:31
  local time: Sat Nov 25 08:12:46 UTC 2023

rust-log-analyzer avatar Nov 25 '23 08:11 rust-log-analyzer

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_resolve v0.0.0 (/checkout/compiler/rustc_resolve)
   Compiling rustc_transmute v0.0.0 (/checkout/compiler/rustc_transmute)
   Compiling rustc_trait_selection v0.0.0 (/checkout/compiler/rustc_trait_selection)
   Compiling rustc_codegen_llvm v0.0.0 (/checkout/compiler/rustc_codegen_llvm)
error: method `pointee_info_at` is never used
    |
    |
187 |     fn pointee_info_at<'a>(&self, cx: &CodegenCx<'a, 'tcx>, offset: Size) -> Option<PointeeInfo>;
    |
    = note: `-D dead-code` implied by `-D warnings`
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`
error: could not compile `rustc_codegen_llvm` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
warning: build failed, waiting for other jobs to finish...
error: method `has_only_region_constraints` is never used
   |
   |
71 | impl<'tcx> CanonicalResponseExt for Canonical<'tcx, Response<'tcx>> {
   | ------------------------------------------------------------------- method in this implementation
78 |     fn has_only_region_constraints(&self) -> bool {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`

error: method `has_only_region_constraints` is never used
   |
68 |     fn has_only_region_constraints(&self) -> bool;
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^


error: method `polarity` is never used
  --> compiler/rustc_trait_selection/src/solve/assembly/mod.rs:40:8
   |
40 |     fn polarity(self) -> ty::ImplPolarity;

error: method `polarity` is never used
   --> compiler/rustc_trait_selection/src/solve/project_goals/mod.rs:104:8
    |
    |
95  | impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
    | ----------------------------------------------------------------- method in this implementation
...
104 |     fn polarity(self) -> ty::ImplPolarity {

error: method `polarity` is never used
  --> compiler/rustc_trait_selection/src/solve/trait_goals.rs:27:8
   |
   |
18 | impl<'tcx> assembly::GoalKind<'tcx> for TraitPredicate<'tcx> {
   | ------------------------------------------------------------ method in this implementation
...
27 |     fn polarity(self) -> ty::ImplPolarity {

error: could not compile `rustc_trait_selection` (lib) due to 5 previous errors
Build completed unsuccessfully in 0:07:46
  local time: Sat Nov 25 09:24:22 UTC 2023

rust-log-analyzer avatar Nov 25 '23 09:11 rust-log-analyzer

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

Some changes might have occurred in exhaustiveness checking

cc @Nadrieril

rustbot avatar Nov 25 '23 10:11 rustbot

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

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
##[group]Testing stage2 compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu)

running 44 tests
iiF.............F.....iF....................
failures:

---- [codegen-units] tests/codegen-units/item-collection/instantiation-through-vtable.rs stdout ----


error: compilation failed!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/codegen-units/item-collection/instantiation-through-vtable.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" "-Z" "human_readable_cgu_names" "-O" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-units/item-collection/instantiation-through-vtable" "-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/codegen-units/item-collection/instantiation-through-vtable/auxiliary" "-Zprint-mono-items=eager" "-Zinline-in-all-cgus" "-Zmir-opt-level=0"
--- stderr -------------------------------
warning: trait objects without an explicit `dyn` are deprecated
##[warning]  --> /checkout/tests/codegen-units/item-collection/instantiation-through-vtable.rs:29:21
Build completed unsuccessfully in 0:13:11
Build completed unsuccessfully in 0:13:11
   |
29 |     let _ = &s1 as &Trait;
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
   = note: `#[warn(bare_trait_objects)]` on by default
---

warning: trait objects without an explicit `dyn` are deprecated
##[warning]  --> /checkout/tests/codegen-units/item-collection/instantiation-through-vtable.rs:35:21
   |
35 |     let _ = &s1 as &Trait;
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
help: use `dyn`
help: use `dyn`
   |
35 |     let _ = &s1 as &dyn Trait;
   |                     +++

error: methods `foo` and `bar` are never used
   |
16 | impl<T> Trait for Struct<T> {
   | --------------------------- methods in this implementation
   | --------------------------- methods in this implementation
17 |     fn foo(&self) -> u32 { 0 }
18 |     fn bar(&self) {}
   |        ^^^
   |
note: the lint level is defined here
---
---- [codegen-units] tests/codegen-units/item-collection/trait-method-default-impl.rs stdout ----

error: compilation failed!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/codegen-units/item-collection/trait-method-default-impl.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" "-Z" "human_readable_cgu_names" "-O" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-units/item-collection/trait-method-default-impl" "-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/codegen-units/item-collection/trait-method-default-impl/auxiliary" "-Zprint-mono-items=eager" "-Zpolymorphize=on" "-Zinline-mir=no"
--- stderr -------------------------------
warning: unused variable: `x`
##[warning]  --> /checkout/tests/codegen-units/item-collection/trait-method-default-impl.rs:21:23
   |
   |
21 |     fn bar<T2>(&self, x: T1, y: T2) {}
   |                       ^ help: if this is intentional, prefix it with an underscore: `_x`
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `y`
##[warning]  --> /checkout/tests/codegen-units/item-collection/trait-method-default-impl.rs:21:30
##[warning]  --> /checkout/tests/codegen-units/item-collection/trait-method-default-impl.rs:21:30
   |
21 |     fn bar<T2>(&self, x: T1, y: T2) {}
   |                              ^ help: if this is intentional, prefix it with an underscore: `_y`
error: method `foo` is never used
##[error] --> /checkout/tests/codegen-units/item-collection/trait-method-default-impl.rs:7:8
  |
7 |     fn foo(&self) { }
---
---- [codegen-units] tests/codegen-units/item-collection/unsizing.rs stdout ----

error: compilation failed!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/codegen-units/item-collection/unsizing.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" "-Z" "human_readable_cgu_names" "-O" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen-units/item-collection/unsizing" "-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/codegen-units/item-collection/unsizing/auxiliary" "-Zprint-mono-items=eager" "-Zinline-in-all-cgus" "-Zmir-opt-level=0"
--- stderr -------------------------------
warning: trait objects without an explicit `dyn` are deprecated
##[warning]  --> /checkout/tests/codegen-units/item-collection/unsizing.rs:54:40
   |
   |
54 |     let _bool_unsized = bool_sized as &Trait;
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
   = note: `#[warn(bare_trait_objects)]` on by default
   = note: `#[warn(bare_trait_objects)]` on by default
help: use `dyn`
   |
54 |     let _bool_unsized = bool_sized as &dyn Trait;

warning: trait objects without an explicit `dyn` are deprecated
##[warning]  --> /checkout/tests/codegen-units/item-collection/unsizing.rs:60:40
   |
   |
60 |     let _char_unsized = char_sized as &Trait;
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
help: use `dyn`
help: use `dyn`
   |
60 |     let _char_unsized = char_sized as &dyn Trait;

warning: trait objects without an explicit `dyn` are deprecated
##[warning]  --> /checkout/tests/codegen-units/item-collection/unsizing.rs:70:51
   |
   |
70 |     let _struct_unsized = struct_sized as &Struct<Trait>;
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
help: use `dyn`
help: use `dyn`
   |
70 |     let _struct_unsized = struct_sized as &Struct<dyn Trait>;

warning: trait objects without an explicit `dyn` are deprecated
##[warning]  --> /checkout/tests/codegen-units/item-collection/unsizing.rs:76:51
   |
   |
76 |     let _wrapper_sized = wrapper_sized as Wrapper<Trait>;
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
help: use `dyn`
help: use `dyn`
   |
76 |     let _wrapper_sized = wrapper_sized as Wrapper<dyn Trait>;

error: method `foo` is never used
##[error]  --> /checkout/tests/codegen-units/item-collection/unsizing.rs:19:8
   |

rust-log-analyzer avatar Nov 25 '23 10:11 rust-log-analyzer

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

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/const-generics/issues/issue-70225.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/const-generics/issues/issue-70225.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/const-generics/issues/issue-70225" "-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/const-generics/issues/issue-70225/auxiliary"
--- stderr -------------------------------
error: constant `L` is never used
##[error]  --> /checkout/tests/ui/const-generics/issues/issue-70225.rs:5:7
   |

rust-log-analyzer avatar Nov 25 '23 16:11 rust-log-analyzer

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

Click to see the possible cause of the failure (guessed by this bot)

rust-log-analyzer avatar Nov 25 '23 16:11 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)
   Compiling cipher v0.4.4
   Compiling aes v0.8.3
   Compiling env_logger v0.10.0
   Compiling libffi v3.2.0
error: method `as_unix_host_fd` is never used
   |
   |
71 |     fn as_unix_host_fd(&self) -> Option<i32> {
   |
   = note: `-D dead-code` implied by `-D warnings`
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
error: could not compile `miri` (lib) due to 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_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools" CC_x86_64_unknown_linux_gnu="sccache cc" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.76.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.76.0" CFG_VERSION="1.76.0-nightly (4889c0497 2023-11-25)" CFG_VER_DATE="2023-11-25" CFG_VER_HASH="4889c04977378aa631e7f2c6000c3e2ab4b61669" 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 -Wsemicolon_in_expressions_from_macros -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" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap,values()) --check-cfg=cfg(parallel_compiler,values()) --check-cfg=cfg(no_btreemap_remove_entry,values()) --check-cfg=cfg(crossbeam_loom,values()) --check-cfg=cfg(span_locations,values()) --check-cfg=cfg(rustix_use_libc,values()) --check-cfg=cfg(emulate_second_only_system,values()) --check-cfg=cfg(windows_raw_dylib,values()) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.76.0-nightly\t(4889c0497\t2023-11-25)" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap,values()) --check-cfg=cfg(parallel_compiler,values()) --check-cfg=cfg(no_btreemap_remove_entry,values()) --check-cfg=cfg(crossbeam_loom,values()) --check-cfg=cfg(span_locations,values()) --check-cfg=cfg(rustix_use_libc,values()) --check-cfg=cfg(emulate_second_only_system,values()) --check-cfg=cfg(windows_raw_dylib,values()) -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/miri/Cargo.toml"
in-tree tool
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:18
expected success, got: exit status: 101

rust-log-analyzer avatar Nov 25 '23 17:11 rust-log-analyzer

Could you extract the cleanups you do to the rest of the compiler to a standalone PR?

cjgillot avatar Nov 25 '23 18:11 cjgillot

Could you extract the cleanups you do to the rest of the compiler to a standalone PR?

Okay ;)

mu001999 avatar Nov 26 '23 01:11 mu001999

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)
   Compiling cipher v0.4.4
   Compiling aes v0.8.3
   Compiling env_logger v0.10.0
   Compiling libffi v3.2.0
error: method `as_unix_host_fd` is never used
   |
   |
71 |     fn as_unix_host_fd(&self) -> Option<i32> {
   |
   = note: `-D dead-code` implied by `-D warnings`
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`
error: could not compile `miri` (lib) due to 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_TARGET_DIR="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools" CC_x86_64_unknown_linux_gnu="sccache cc" CFG_COMPILER_HOST_TRIPLE="x86_64-unknown-linux-gnu" CFG_RELEASE="1.76.0-nightly" CFG_RELEASE_CHANNEL="nightly" CFG_RELEASE_NUM="1.76.0" CFG_VERSION="1.76.0-nightly (f09858ca6 2023-11-26)" CFG_VER_DATE="2023-11-26" CFG_VER_HASH="f09858ca671e62c3e7e17ec88de253b706fed34a" 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 -Wsemicolon_in_expressions_from_macros -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" RUSTDOC="/checkout/obj/build/bootstrap/debug/rustdoc" RUSTDOCFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap,values()) --check-cfg=cfg(parallel_compiler,values()) --check-cfg=cfg(no_btreemap_remove_entry,values()) --check-cfg=cfg(crossbeam_loom,values()) --check-cfg=cfg(span_locations,values()) --check-cfg=cfg(rustix_use_libc,values()) --check-cfg=cfg(emulate_second_only_system,values()) --check-cfg=cfg(windows_raw_dylib,values()) -Dwarnings -Wrustdoc::invalid_codeblock_attributes --crate-version 1.76.0-nightly\t(f09858ca6\t2023-11-26)" RUSTDOC_REAL="/path/to/nowhere/rustdoc/not/required" RUSTFLAGS="--cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zunstable-options --check-cfg=cfg(bootstrap,values()) --check-cfg=cfg(parallel_compiler,values()) --check-cfg=cfg(no_btreemap_remove_entry,values()) --check-cfg=cfg(crossbeam_loom,values()) --check-cfg=cfg(span_locations,values()) --check-cfg=cfg(rustix_use_libc,values()) --check-cfg=cfg(emulate_second_only_system,values()) --check-cfg=cfg(windows_raw_dylib,values()) -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/miri/Cargo.toml"
in-tree tool
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:18
expected success, got: exit status: 101

rust-log-analyzer avatar Nov 26 '23 06:11 rust-log-analyzer

The Miri subtree was changed

cc @rust-lang/miri

rustbot avatar Nov 26 '23 08:11 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)
## Running ui tests in tests/pass against miri for x86_64-unknown-linux-gnu
   Compiler: "MIRI_ENV_VAR_TEST"="0" "MIRI_TEMP"="/tmp" /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--target" "x86_64-unknown-linux-gnu" "--out-dir" OUT_DIR

FAILED TEST: tests/pass/cast-rfc0401-vtable-kinds.rs (revision `stack`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--target" "x86_64-unknown-linux-gnu" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui/tests/pass" "tests/pass/cast-rfc0401-vtable-kinds.rs" "--cfg=stack" "--edition" "2021"
error: pass test got exit status: 1, but expected 0
Error: 

   0: tests failed
   0: tests failed

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/cast-rfc0401-vtable-kinds.stack.stderr` to the actual output
+++ <stderr output>
+error: trait `Bar` is never used
Run with RUST_BACKTRACE=full to include source snippets.
error: test failed, to rerun pass `--test compiletest`
---
+   |
+LL | trait Bar {
+   |       ^^^
+   |
+   = note: `-D dead-code` implied by `-D unused`
+   = help: to override `-D unused` add `#[allow(dead_code)]`
+error: method `bar` is never used
+  --> $DIR/cast-rfc0401-vtable-kinds.rs:LL:CC
+   |
+LL |     fn bar(&self) {
+LL |     fn bar(&self) {
+   |        ^^^
+
+error: miri cannot be run on programs that fail compilation
+error: aborting due to 3 previous errors
+



error: there were 1 unmatched diagnostics that occurred outside the testfile and had no pattern
    Error: miri cannot be run on programs that fail compilation
error: there were 1 unmatched diagnostics
##[error]  --> tests/pass/cast-rfc0401-vtable-kinds.rs:12:7
   |
12 | trait Bar {
12 | trait Bar {
   |       ^^^ Error: trait `Bar` is never used

error: there were 1 unmatched diagnostics
##[error]  --> tests/pass/cast-rfc0401-vtable-kinds.rs:13:8
   |
---
   |
LL | trait Bar {
   |       ^^^
   |
   = note: `-D dead-code` implied by `-D unused`
   = help: to override `-D unused` add `#[allow(dead_code)]`
error: method `bar` is never used
##[error]  --> tests/pass/cast-rfc0401-vtable-kinds.rs:13:8
   |
LL |     fn bar(&self) {
LL |     fn bar(&self) {
   |        ^^^

error: miri cannot be run on programs that fail compilation
error: aborting due to 3 previous errors


full stdout:
full stdout:



FAILED TEST: tests/pass/cast-rfc0401-vtable-kinds.rs (revision `tree`)
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--target" "x86_64-unknown-linux-gnu" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui/tests/pass" "tests/pass/cast-rfc0401-vtable-kinds.rs" "--cfg=tree" "-Zmiri-tree-borrows" "--edition" "2021"
error: pass test got exit status: 1, but expected 0

error: actual output differed from expected
error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/cast-rfc0401-vtable-kinds.tree.stderr` to the actual output
--- tests/pass/cast-rfc0401-vtable-kinds.tree.stderr
+error: trait `Bar` is never used
+  --> $DIR/cast-rfc0401-vtable-kinds.rs:LL:CC
+   |
+LL | trait Bar {
+LL | trait Bar {
+   |       ^^^
+   |
+   = note: `-D dead-code` implied by `-D unused`
+   = help: to override `-D unused` add `#[allow(dead_code)]`
+error: method `bar` is never used
+  --> $DIR/cast-rfc0401-vtable-kinds.rs:LL:CC
+   |
+LL |     fn bar(&self) {
+LL |     fn bar(&self) {
+   |        ^^^
+
+error: miri cannot be run on programs that fail compilation
+error: aborting due to 3 previous errors
+



error: there were 1 unmatched diagnostics that occurred outside the testfile and had no pattern
    Error: miri cannot be run on programs that fail compilation
error: there were 1 unmatched diagnostics
##[error]  --> tests/pass/cast-rfc0401-vtable-kinds.rs:12:7
   |
12 | trait Bar {
12 | trait Bar {
   |       ^^^ Error: trait `Bar` is never used

error: there were 1 unmatched diagnostics
##[error]  --> tests/pass/cast-rfc0401-vtable-kinds.rs:13:8
   |
---
   |
LL | trait Bar {
   |       ^^^
   |
   = note: `-D dead-code` implied by `-D unused`
   = help: to override `-D unused` add `#[allow(dead_code)]`
error: method `bar` is never used
##[error]  --> tests/pass/cast-rfc0401-vtable-kinds.rs:13:8
   |
LL |     fn bar(&self) {
LL |     fn bar(&self) {
   |        ^^^

error: miri cannot be run on programs that fail compilation
error: aborting due to 3 previous errors


full stdout:
full stdout:



FAILED TEST: tests/pass/dyn-upcast.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--target" "x86_64-unknown-linux-gnu" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui/tests/pass" "tests/pass/dyn-upcast.rs" "--edition" "2021"
error: pass test got exit status: 1, but expected 0

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/dyn-upcast.stderr` to the actual output
Execute `./miri test --bless` to update `tests/pass/dyn-upcast.stderr` to the actual output
--- tests/pass/dyn-upcast.stderr
+++ <stderr output>
+error: method `foo_a` is never used
+   |
+LL |     impl A for S {
+   |     ------------ method in this implementation
+   |     ------------ method in this implementation
+LL |         fn foo_a(&self) {
+   |
+   |
+   = note: `-D dead-code` implied by `-D unused`
+   = help: to override `-D unused` add `#[allow(dead_code)]`
+
+error: method `foo_c` is never used
+   |
+LL |     impl C for S {
+   |     ------------ method in this implementation
+   |     ------------ method in this implementation
+LL |         fn foo_c(&self) {
+
+
+error: method `foo_a` is never used
+   |
+   |
+LL |         fn foo_a(&self);
+
Build completed unsuccessfully in 0:02:21
Build completed unsuccessfully in 0:02:21
+error: method `foo_c` is never used
+   |
+   |
+LL |         fn foo_c(&self);
+
+
+error: miri cannot be run on programs that fail compilation
+error: aborting due to 5 previous errors
+



error: there were 1 unmatched diagnostics that occurred outside the testfile and had no pattern
    Error: miri cannot be run on programs that fail compilation
error: there were 1 unmatched diagnostics
##[error]   --> tests/pass/dyn-upcast.rs:383:12
    |
    |
383 |         fn foo_a(&self);
    |            ^^^^^ Error: method `foo_a` is never used

error: there were 1 unmatched diagnostics
##[error]   --> tests/pass/dyn-upcast.rs:391:12
    |
    |
391 |         fn foo_c(&self);
    |            ^^^^^ Error: method `foo_c` is never used

error: there were 1 unmatched diagnostics
##[error]   --> tests/pass/dyn-upcast.rs:397:12
    |
    |
397 |         fn foo_a(&self) {
    |            ^^^^^ Error: method `foo_a` is never used

error: there were 1 unmatched diagnostics
##[error]   --> tests/pass/dyn-upcast.rs:409:12
    |
    |
409 |         fn foo_c(&self) {
    |            ^^^^^ Error: method `foo_c` is never used

full stderr:
full stderr:
error: method `foo_a` is never used
   |
LL |     impl A for S {
   |     ------------ method in this implementation
   |     ------------ method in this implementation
LL |         fn foo_a(&self) {
   |
   |
   = note: `-D dead-code` implied by `-D unused`
   = help: to override `-D unused` add `#[allow(dead_code)]`

error: method `foo_c` is never used
   |
LL |     impl C for S {
   |     ------------ method in this implementation
   |     ------------ method in this implementation
LL |         fn foo_c(&self) {


error: method `foo_a` is never used
   |
   |
LL |         fn foo_a(&self);


error: method `foo_c` is never used
   |
   |
LL |         fn foo_c(&self);


error: miri cannot be run on programs that fail compilation
error: aborting due to 5 previous errors


full stdout:
full stdout:



FAILED TEST: tests/pass/weak_memory/weak.rs
command: MIRI_ENV_VAR_TEST="0" MIRI_TEMP="/tmp" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/miri" "--error-format=json" "-Dwarnings" "-Dunused" "-Ainternal_features" "-Zui-testing" "--target" "x86_64-unknown-linux-gnu" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/ui/tests/pass/weak_memory" "tests/pass/weak_memory/weak.rs" "-Zmiri-ignore-leaks" "-Zmiri-preemption-rate=0" "--edition" "2021"
error: pass test got exit status: 1, but expected 0

error: actual output differed from expected
Execute `./miri test --bless` to update `tests/pass/weak_memory/weak.stderr` to the actual output
Execute `./miri test --bless` to update `tests/pass/weak_memory/weak.stderr` to the actual output
--- tests/pass/weak_memory/weak.stderr
+++ <stderr output>
+error: struct `EvilSend` is never constructed
+   |
+   |
+LL | struct EvilSend<T>(pub T);
+   |
+   |
+   = note: `EvilSend` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
+   = note: `-D dead-code` implied by `-D unused`
+   = help: to override `-D unused` add `#[allow(dead_code)]`
+
+error: miri cannot be run on programs that fail compilation
+error: aborting due to 2 previous errors
+



error: there were 1 unmatched diagnostics that occurred outside the testfile and had no pattern
    Error: miri cannot be run on programs that fail compilation
error: there were 1 unmatched diagnostics
##[error]  --> tests/pass/weak_memory/weak.rs:15:8
   |
   |
15 | struct EvilSend<T>(pub T);
   |        ^^^^^^^^ Error: struct `EvilSend` is never constructed

full stderr:
full stderr:
error: struct `EvilSend` is never constructed
   |
   |
LL | struct EvilSend<T>(pub T);
   |
   |
   = note: `EvilSend` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
   = note: `-D dead-code` implied by `-D unused`
   = help: to override `-D unused` add `#[allow(dead_code)]`

error: miri cannot be run on programs that fail compilation
error: aborting due to 2 previous errors


full stdout:

rust-log-analyzer avatar Nov 26 '23 09:11 rust-log-analyzer

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

Click to see the possible cause of the failure (guessed by this bot)

rust-log-analyzer avatar Nov 26 '23 14:11 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)
    Checking rustc_driver v0.0.0 (/checkout/compiler/rustc_driver)
error: unused import: `Lrc`
 --> compiler/rustc_span/src/source_map/tests.rs:3:47
  |
3 | use rustc_data_structures::sync::{FreezeLock, Lrc};
  |
  = note: `-D unused-imports` implied by `-D warnings`
  = note: `-D unused-imports` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(unused_imports)]`
error: could not compile `rustc_span` (lib test) due to previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:01:54
  local time: Tue Nov 28 01:13:06 UTC 2023

rust-log-analyzer avatar Nov 28 '23 01:11 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #118543) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Dec 02 '23 18:12 bors

:umbrella: The latest upstream changes (presumably #118692) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Dec 10 '23 14:12 bors

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)
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: Mon Dec 11 01:06:59 UTC 2023
  network time: Mon, 11 Dec 2023 01:06:59 GMT
  network time: Mon, 11 Dec 2023 01:06:59 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', '--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', '--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-missing-tools', '--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: rust.codegen-units-std := 1
---
   Compiling gccjit_sys v0.0.1 (https://github.com/antoyo/gccjit.rs#6e290f25)
   Compiling gccjit v1.0.0 (https://github.com/antoyo/gccjit.rs#6e290f25)
   Compiling tempfile v3.7.1
   Compiling rustc_codegen_gcc v0.1.0 (/checkout/compiler/rustc_codegen_gcc)
error: methods `is_f32` and `is_f64` are never used
    |
    |
357 | pub trait TypeReflection<'gcc, 'tcx>  {
    |           -------------- methods in this trait
...
380 |     fn is_f32(&self, cx: &CodegenCx<'gcc, 'tcx>) -> bool;
    |        ^^^^^^
381 |     fn is_f64(&self, cx: &CodegenCx<'gcc, 'tcx>) -> bool;
    |
    = note: `-D dead-code` implied by `-D warnings`
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`

error: struct `FuncSig` is never constructed
   |
   |
26 | pub struct FuncSig<'gcc> {
   |
   |
   = note: `FuncSig` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
error: could not compile `rustc_codegen_gcc` (lib) due to 2 previous errors
Build completed unsuccessfully in 0:10:46
  local time: Mon Dec 11 01:18:20 UTC 2023
  network time: Mon, 11 Dec 2023 01:18:20 GMT

rust-log-analyzer avatar Dec 11 '23 01:12 rust-log-analyzer

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

rustbot avatar Dec 11 '23 01:12 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)
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: Mon Dec 11 01:41:02 UTC 2023
  network time: Mon, 11 Dec 2023 01:41:02 GMT
  network time: Mon, 11 Dec 2023 01:41:02 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', '--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', '--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-missing-tools', '--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: rust.codegen-units-std := 1
---

---- [ui] tests/ui/traits/wf-object/reverse-order.rs stdout ----
diff of stderr:

1 warning: trait `Obj` is never used
-   --> $DIR/reverse-order.rs:8:7
+   --> $DIR/reverse-order.rs:6:7
4 LL | trait Obj {}
5    |       ^^^


---
status: exit status: 0
command: RUSTC_ICE="0" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/traits/wf-object/reverse-order.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/traits/wf-object/reverse-order/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/traits/wf-object/reverse-order/auxiliary"
stdout: none
--- stderr -------------------------------
warning: trait `Obj` is never used
   |
   |
LL | trait Obj {} //~ WARN trait `Obj` is never used
Build completed unsuccessfully in 0:13:21
   |
   = note: `#[warn(dead_code)]` on by default

rust-log-analyzer avatar Dec 11 '23 01:12 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #118823) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Dec 11 '23 15:12 bors

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits:

  • 296a12a68788fc23519b747de7ac55e0dbee4ede

rustbot avatar Dec 12 '23 09:12 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)
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: Tue Dec 12 09:07:54 UTC 2023
  network time: Tue, 12 Dec 2023 09:07:54 GMT
  network time: Tue, 12 Dec 2023 09:07:54 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', '--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', '--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-missing-tools', '--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: rust.codegen-units-std := 1
---
   Compiling libc v0.2.150
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/checkout/library/std)
   Compiling compiler_builtins v0.1.103
error[E0407]: method `to_u32` is not a member of trait `DisplayInt`
  --> library/core/src/fmt/num.rs:43:11
37 | / macro_rules! impl_uint {
37 | / macro_rules! impl_uint {
38 | |     ($($t:ident)*) => (
39 | |       $(impl DisplayInt for $t {
40 | |           fn zero() -> Self { 0 }
...  |
43 | |           fn to_u32(&self) -> u32 { *self as u32 }
   | |           ^^^------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |           |  help: there is an associated function with a similar name: `to_u8`
   | |           not a member of trait `DisplayInt`
...  |
47 | |     )
47 | |     )
48 | | }
   | |_- in this expansion of `impl_uint!`
...
51 |   impl_uint! { u8 u16 u32 u64 u128 usize }

For more information about this error, try `rustc --explain E0407`.
error: could not compile `core` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

rust-log-analyzer avatar Dec 12 '23 09:12 rust-log-analyzer

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

Click to see the possible cause of the failure (guessed by this bot)
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v4' (SHA:b4ffde65f46336ab88eb53be808477a3936bae11)
Download action repository 'actions/upload-artifact@v3' (SHA:a8a3f3ad30e3422c9c7b888a15615d19a852ae32)
Complete job name: PR - mingw-check-tidy
git config --global core.autocrlf false
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
Removing intermediate container 1698e2833ee7
 ---> e65381143a36
Step 6/10 : COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
 ---> 783e3e2ea6ee
Step 7/10 : RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt     && pip3 install virtualenv
Collecting binaryornot==0.4.4
  Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting boolean-py==4.0
  Downloading boolean.py-4.0-py3-none-any.whl (25 kB)
---
Building wheels for collected packages: reuse
  Building wheel for reuse (pyproject.toml): started
  Building wheel for reuse (pyproject.toml): finished with status 'done'
  Created wheel for reuse: filename=reuse-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl size=180123 sha256=f323ccf11d14c5b11f6d5e70edb46e391f4b49a5df5c7d922224477ad8ee15c5
  Stored in directory: /tmp/pip-ephem-wheel-cache-ljuw10bb/wheels/c2/3c/b9/1120c2ab4bd82694f7e6f0537dc5b9a085c13e2c69a8d0c76d
Installing collected packages: boolean-py, binaryornot, setuptools, reuse, python-debian, markupsafe, license-expression, jinja2, chardet
  Attempting uninstall: setuptools
    Found existing installation: setuptools 59.6.0
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
    Can't uninstall 'setuptools'. No files were found to uninstall.
Successfully installed binaryornot-0.4.4 boolean-py-4.0 chardet-5.1.0 jinja2-3.1.2 license-expression-30.0.0 markupsafe-2.1.1 python-debian-0.1.49 reuse-1.1.0 setuptools-66.0.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting virtualenv
  Downloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 19.6 MB/s eta 0:00:00
Collecting distlib<1,>=0.3.7
  Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
Collecting filelock<4,>=3.12.2
  Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
  Downloading filelock-3.13.1-py3-none-any.whl (11 kB)
Collecting platformdirs<5,>=3.9.1
  Downloading platformdirs-4.1.0-py3-none-any.whl (17 kB)
Installing collected packages: distlib, platformdirs, filelock, virtualenv
Successfully installed distlib-0.3.8 filelock-3.13.1 platformdirs-4.1.0 virtualenv-20.25.0
Removing intermediate container 80d3f5435180
 ---> 486d4059b8c1
Step 8/10 : COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
 ---> 7b4ef780f18b
 ---> 7b4ef780f18b
Step 9/10 : COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
 ---> 8507050e7614
Step 10/10 : ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
Removing intermediate container 7a31fd95d9c5
 ---> b82d5ad8dabd
Successfully built b82d5ad8dabd
Successfully tagged rust-ci:latest
Successfully tagged rust-ci:latest
##[endgroup]
Built container sha256:b82d5ad8dabd4a07b829a66053923808aefbf3a0e7710c5d4a58fba23718be03
Uploading finished image sha256:b82d5ad8dabd4a07b829a66053923808aefbf3a0e7710c5d4a58fba23718be03 to https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a
IMAGE          CREATED          CREATED BY                                      SIZE      COMMENT
b82d5ad8dabd   1 second ago     /bin/sh -c #(nop)  ENV SCRIPT=TIDY_PRINT_DIF…   0B        
7b4ef780f18b   2 seconds ago    /bin/sh -c #(nop) COPY file:078ea1d11e7b7cda…   367B      
486d4059b8c1   3 seconds ago    |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c…   23.9MB    
783e3e2ea6ee   10 seconds ago   /bin/sh -c #(nop) COPY file:ac591dd6bc5afa66…   5.33kB    
e65381143a36   11 seconds ago   |1 DEBIAN_FRONTEND=noninteractive /bin/sh -c…   23.1MB    
---
<missing>      11 days ago      /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B        
<missing>      11 days ago      /bin/sh -c #(nop)  ARG LAUNCHPAD_BUILD_ARCH     0B        
<missing>      11 days ago      /bin/sh -c #(nop)  ARG RELEASE                  0B        

<botocore.awsrequest.AWSRequest object at 0x7f8ea935e1d0>
gzip: stdout: Broken pipe
xargs: docker: terminated by signal 13
https://ci-caches.rust-lang.org/docker/139141a603ff222e98d20ef66f0e4eaedfc4b373e41d302ecff577f90ee0c6cf0cab092d18a8f6a073c88b362b9a680d3b2b6e5c828faaf25d1b853eabb78b1a
sha256:b82d5ad8dabd4a07b829a66053923808aefbf3a0e7710c5d4a58fba23718be03
---
DirectMap4k:      194496 kB
DirectMap2M:     5048320 kB
DirectMap1G:    13631488 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint
    Finished dev [unoptimized] target(s) in 0.03s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/1c15b82b8a3c6fc36cf0f20bbf33a2e316be1e80/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-1c15b82b8a3c6fc36cf0f20bbf33a2e316be1e80-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
    Finished release [optimized] target(s) in 25.14s
##[endgroup]
fmt check
tidy check
tidy error: following path contains more than 869 entries, you should move the test to some relevant subdirectory (current: 870): /checkout/tests/ui
removing old virtual environment
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (23.3.1)
Collecting black==23.3.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 7))
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 14.2 MB/s eta 0:00:00
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 14.2 MB/s eta 0:00:00
Collecting click==8.1.3 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 34))
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
Collecting importlib-metadata==6.7.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 38))
  Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
  Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
Collecting mypy-extensions==1.0.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 42))
  Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting packaging==23.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 46))
  Downloading packaging-23.1-py3-none-any.whl (48 kB)
Collecting pathspec==0.11.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 50))
  Downloading pathspec-0.11.1-py3-none-any.whl (29 kB)
  Downloading pathspec-0.11.1-py3-none-any.whl (29 kB)
Collecting platformdirs==3.6.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 54))
  Downloading platformdirs-3.6.0-py3-none-any.whl (16 kB)
Collecting ruff==0.0.272 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 58))
  Downloading ruff-0.0.272-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.9 MB)
Collecting tomli==2.0.1 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 77))
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting typed-ast==1.5.4 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 81))
  Downloading typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (877 kB)
  Downloading typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (877 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 877.7/877.7 kB 76.2 MB/s eta 0:00:00
Collecting typing-extensions==4.6.3 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 107))
  Downloading typing_extensions-4.6.3-py3-none-any.whl (31 kB)
Collecting zipp==3.15.0 (from -r /checkout/src/tools/tidy/config/requirements.txt (line 114))
  Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB)
Installing collected packages: zipp, typing-extensions, typed-ast, tomli, ruff, platformdirs, pathspec, packaging, mypy-extensions, click, importlib-metadata, black
Successfully installed black-23.3.0 click-8.1.3 importlib-metadata-6.7.0 mypy-extensions-1.0.0 packaging-23.1 pathspec-0.11.1 platformdirs-3.6.0 ruff-0.0.272 tomli-2.0.1 typed-ast-1.5.4 typing-extensions-4.6.3 zipp-3.15.0
some tidy checks failed
Build completed unsuccessfully in 0:01:01
  local time: Tue Dec 12 09:47:22 UTC 2023
  network time: Tue, 12 Dec 2023 09:47:22 GMT

rust-log-analyzer avatar Dec 12 '23 09:12 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)
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: Tue Dec 12 09:54:29 UTC 2023
  network time: Tue, 12 Dec 2023 09:54:29 GMT
  network time: Tue, 12 Dec 2023 09:54:29 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', '--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', '--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-missing-tools', '--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: rust.codegen-units-std := 1
---
1 warning: method `foo` is never used
-   --> $DIR/mir_raw_fat_ptr.rs:99:16
+   --> $DIR/mir_raw_fat_ptr.rs:101:16
3    |
4 LL | trait Foo { fn foo(&self) -> usize; }


The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/mir/mir_raw_fat_ptr/mir_raw_fat_ptr.stderr
---
--- stderr -------------------------------
warning: method `foo` is never used
##[warning]  --> /checkout/tests/ui/mir/mir_raw_fat_ptr.rs:101:16
   |
LL | trait Foo { fn foo(&self) -> usize; } //~ WARN method `foo` is never used
   |       |
   |       method in this trait
   |
   = note: `#[warn(dead_code)]` on by default

rust-log-analyzer avatar Dec 12 '23 10:12 rust-log-analyzer