Skip to content
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

Initial commit working on edition based method disambiguation #96690

Closed

Conversation

yaahc
Copy link
Member

@yaahc yaahc commented May 4, 2022

Initial implementation of rust-lang/rfcs#3240

@rust-highfive
Copy link
Collaborator

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 4, 2022
@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 4, 2022
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
normalized stderr:
error[E0034]: multiple applicable items in scope
  --> $DIR/edition-field.rs:23:27
   |
LL |     let _intersperse = it.intersperse(());
   |                           ^^^^^^^^^^^ multiple `intersperse` found
   |
note: candidate #1 is defined in an impl of the trait `Itertools` for the type `T`
   |
   |
LL |     fn intersperse(&self, separator: ()) -> Intersperse {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `edition_field_std::Iterator` for the type `MyIterator`
   |
   |
LL | impl Iterator for MyIterator {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #3 is defined in the trait `std::iter::Iterator`
  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
   |
LL | /     fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
LL | |     where
LL | |         Self: Sized,
LL | |         Self::Item: Clone,
help: disambiguate the associated function for candidate #1
   |
   |
LL |     let _intersperse = Itertools::intersperse(&it, ());
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
help: disambiguate the associated function for candidate #2
   |
   |
LL |     let _intersperse = edition_field_std::Iterator::intersperse(&it, ());
help: disambiguate the associated function for candidate #3
   |
   |
LL |     let _intersperse = std::iter::Iterator::intersperse(it, ());

error: aborting due to previous error

For more information about this error, try `rustc --explain E0034`.
---
To only update this specific test, also pass `--test-args stability-attribute/edition-field.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/stability-attribute/edition-field.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/stability-attribute/edition-field" "-A" "unused" "-Crpath" "-O" "-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/stability-attribute/edition-field/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0034]: multiple applicable items in scope
  --> /checkout/src/test/ui/stability-attribute/edition-field.rs:23:27
   |
LL |     let _intersperse = it.intersperse(());
   |                           ^^^^^^^^^^^ multiple `intersperse` found
   |
note: candidate #1 is defined in an impl of the trait `Itertools` for the type `T`
  --> /checkout/src/test/ui/stability-attribute/edition-field.rs:9:5
   |
LL |     fn intersperse(&self, separator: ()) -> Intersperse {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in an impl of the trait `edition_field_std::Iterator` for the type `MyIterator`
  --> /checkout/src/test/ui/stability-attribute/edition-field.rs:19:1
   |
LL | impl Iterator for MyIterator {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #3 is defined in the trait `std::iter::Iterator`
   |
   |
LL | /     fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
LL | |     where
LL | |         Self: Sized,
LL | |         Self::Item: Clone,
help: disambiguate the associated function for candidate #1
   |
   |
LL |     let _intersperse = Itertools::intersperse(&it, ());
help: disambiguate the associated function for candidate #2
   |
   |
LL |     let _intersperse = edition_field_std::Iterator::intersperse(&it, ());
help: disambiguate the associated function for candidate #3
   |
   |
LL |     let _intersperse = std::iter::Iterator::intersperse(it, ());

error: aborting due to previous error

For more information about this error, try `rustc --explain E0034`.

@petrochenkov petrochenkov 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 May 4, 2022
@bors
Copy link
Contributor

bors commented Jul 14, 2022

☔ The latest upstream changes (presumably #95956) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member

@yaahc any updates?

@yaahc
Copy link
Member Author

yaahc commented Jan 19, 2023

I'm busy with governance-wg work right now. I'm hoping I'll be able to spend thursdays and fridays on coding starting next week but it was supposed to start this week and I already had to change plans to make room for more governance work so I'm not sure when I'll get to this. I'm still planning to work on it.

@Dylan-DPC
Copy link
Member

Closing this due to inactivity.

@Dylan-DPC Dylan-DPC closed this Jul 21, 2023
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants