Skip to content

EXPERIMENT: Assemble inherent pick for trait blanket impl #128560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Aug 2, 2024

Vaguely gauging the fallout of #128509. There are caveats, like how this only detects impls that are for T, not hidden behind aliases or anything.

With this PR:

error[E0034]: multiple applicable items in scope
  --> /home/michael/test.rs:35:14
   |
35 |         self.do_more_things();
   |              ^^^^^^^^^^^^^^ multiple `do_more_things` found
   |
note: candidate #1 is defined in the trait `TraitA`
  --> /home/michael/test.rs:9:5
   |
9  |     fn do_more_things(&self);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `TraitB`
  --> /home/michael/test.rs:25:5
   |
25 |     fn do_more_things(&self) {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
   |
35 |         TraitA::do_more_things(&self);
   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the method for candidate #2
   |
35 |         TraitB::do_more_things(&self);
   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

r? @ghost

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 2, 2024
@compiler-errors
Copy link
Member Author

@bors try

@bors
Copy link
Collaborator

bors commented Aug 2, 2024

⌛ Trying commit ec8e229 with merge c4c0964...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2024
…mpl, r=<try>

EXPERIMENT: Assemble inherent pick for trait blanket impl

Vaguely gauging the fallout of rust-lang#128509. There are caveats, like how this only detects impls that are `for T`, not hidden behind aliases or anything.

r? `@ghost`
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
------
 > importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:3aacb9c90579defe09351ac5e8ee504359f8054da6326ff19038f1b7c90e3cb2aafe33685c6d9b76ee8d2ccbd187ca80c46ab5380485abdd8c0ce7d69cd8d8fd:
------
##[endgroup]
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-17]
---
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-17', '--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', 'rust.lld=false', '--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-17/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
   Compiling perf-event-open-sys v3.0.0
error[E0034]: multiple applicable items in scope
  --> /cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.7/src/digest.rs:69:11
   |
69 |         h.update(data.as_ref());
   |           ^^^^^^ multiple `update` found
note: candidate #1 is defined in the trait `Digest`
  --> /cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.7/src/digest.rs:23:5
   |
   |
23 |     fn update(&mut self, data: impl AsRef<[u8]>);
note: candidate #2 is defined in the trait `Update`
  --> /cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.7/src/lib.rs:79:5
   |
79 |     fn update(&mut self, data: &[u8]);
79 |     fn update(&mut self, data: &[u8]);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
   |
69 |         Digest::update(&mut h, data.as_ref());
help: disambiguate the method for candidate #2
   |
   |
69 |         Update::update(&mut h, data.as_ref());

error[E0034]: multiple applicable items in scope
   --> /cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.7/src/digest.rs:126:16
    |
    |
126 |         hasher.update(data.as_ref());
    |                ^^^^^^ multiple `update` found
note: candidate #1 is defined in the trait `Digest`
   --> /cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.7/src/digest.rs:23:5
    |
    |
23  |     fn update(&mut self, data: impl AsRef<[u8]>);
note: candidate #2 is defined in the trait `Update`
   --> /cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.7/src/lib.rs:79:5
    |
79  |     fn update(&mut self, data: &[u8]);

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
   Compiling jobserver v0.1.31
error[E0034]: multiple applicable items in scope
  --> /rust/deps/digest-0.10.7/src/digest.rs:69:11
   |
69 |         h.update(data.as_ref());
   |           ^^^^^^ multiple `update` found
note: candidate #1 is defined in the trait `Digest`
  --> /rust/deps/digest-0.10.7/src/digest.rs:23:5
   |
   |
23 |     fn update(&mut self, data: impl AsRef<[u8]>);
note: candidate #2 is defined in the trait `Update`
  --> /rust/deps/digest-0.10.7/src/lib.rs:79:5
   |
79 |     fn update(&mut self, data: &[u8]);
79 |     fn update(&mut self, data: &[u8]);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the method for candidate #1
   |
69 |         Digest::update(&mut h, data.as_ref());
help: disambiguate the method for candidate #2
   |
   |
69 |         Update::update(&mut h, data.as_ref());

error[E0034]: multiple applicable items in scope
   --> /rust/deps/digest-0.10.7/src/digest.rs:126:16
    |
    |
126 |         hasher.update(data.as_ref());
    |                ^^^^^^ multiple `update` found
note: candidate #1 is defined in the trait `Digest`
   --> /rust/deps/digest-0.10.7/src/digest.rs:23:5
    |
    |
23  |     fn update(&mut self, data: impl AsRef<[u8]>);
note: candidate #2 is defined in the trait `Update`
   --> /rust/deps/digest-0.10.7/src/lib.rs:79:5
    |
79  |     fn update(&mut self, data: &[u8]);
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.86/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/exec.rs:80:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/exec.rs:181:9
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/main.rs:225:13
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/main.rs:225:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/main.rs:214:9
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/main.rs:214:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/main.rs:211:29
   8: opt_dist::main
             at /rustc/c4c0964f4025f29bf3361f1dbc500266fa041cd9/src/tools/opt-dist/src/main.rs:401:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/core/src/ops/function.rs:250:5
  10: std::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/sys/backtrace.rs:152:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/rt.rs:162:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
  13: std::panicking::try::do_call
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/panicking.rs:557:40
  14: std::panicking::try
             at /rustc/08328a323ecd80b443a8fcc72c6b1071f48e233f/library/std/src/panicking.rs:521:19

@bors
Copy link
Collaborator

bors commented Aug 2, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants