-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
If two traits provide a method with the same name, and said method is used in an "unambiguous" way, the compiler picks the "wrong" trait #16949
Labels
P-medium
Medium priority
Comments
Recommend closing as a dupe of trait reform. |
Let's leave this open (to ensure we add a separate test for it in case its not a true dupe of #12825), but its just P-high, not 1.0 blocker. |
This code now compiles correctly. |
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Apr 7, 2024
Fix tasks in tasks.json rust-lang#16839 refactored the representation of tasks inside the VS Code extension. However, this data type is exposed to users, who can define their own tasks in the same format in `tasks.json` or `.code-workspace`. Revert the data type to have a `command` field rather than a `program` field, and document the different fields. This code is also a little complex, so split out a `cargoToExecution` to handle the Task to Execution conversion logic. After this change, any tasks.json with a `command` field works again. For example, the following tasks.json works as expected: ``` { "version": "2.0.0", "tasks": [ { "type": "cargo", "command": "build", "problemMatcher": [ "$rustc" ], "group": "build", "label": "my example cargo build task" } ] } ``` Fixes rust-lang#16943 rust-lang#16949
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
Apr 20, 2024
Fix tasks in tasks.json rust-lang#16839 refactored the representation of tasks inside the VS Code extension. However, this data type is exposed to users, who can define their own tasks in the same format in `tasks.json` or `.code-workspace`. Revert the data type to have a `command` field rather than a `program` field, and document the different fields. This code is also a little complex, so split out a `cargoToExecution` to handle the Task to Execution conversion logic. After this change, any tasks.json with a `command` field works again. For example, the following tasks.json works as expected: ``` { "version": "2.0.0", "tasks": [ { "type": "cargo", "command": "build", "problemMatcher": [ "$rustc" ], "group": "build", "label": "my example cargo build task" } ] } ``` Fixes rust-lang#16943 rust-lang#16949
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Worth noting, that the traits are implemented for "non-overlapping" types. (Hence, I said "unambiguous" in the title)
STR
Output
(Off-topic: Same error 4 times?)
Version
For completeness sake, here's the definition/impl of
std::iter::AdditiveIterator
:Altough I can work around this issue, I get the feeling that the compiler should be able to handle this case (but I could be wrong).
cc @nikomatsakis
EDIT: Added
rustc
versionThe text was updated successfully, but these errors were encountered: