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

Tracking issue for overlapping_inherent_impls compatibility lint #36889

Closed
2 of 3 tasks
petrochenkov opened this issue Oct 1, 2016 · 18 comments
Closed
2 of 3 tasks

Tracking issue for overlapping_inherent_impls compatibility lint #36889

petrochenkov opened this issue Oct 1, 2016 · 18 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. B-unstable Blocker: Implemented in the nightly compiler and unstable. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

petrochenkov commented Oct 1, 2016

UPDATE: We've decided to convert this warning into a hard error, but are still waiting for a PR to make that a reality. If you're interested in contributing, there are directions for writing such a PR available here.

This tracking issue pertains to a bug fix for #22889. The problem was that the compiler was accepting two inherent impls that both defined the same method, which creates an obvious ambiguity:

struct Foo;

impl Foo {
    fn id() {}
}

impl Foo {
    fn id() {}
}

The most obvious fix here is to give one method a distinct name, though sometimes there are other possible rewrites (e.g., one could rewrite the impls to use a double dispatch pattern).

Current status

@petrochenkov
Copy link
Contributor Author

@aturon , could you write a description for this?

@steveklabnik steveklabnik added the A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. label Oct 7, 2016
@QuietMisdreavus
Copy link
Member

#38967 could be related to this.

@nikomatsakis nikomatsakis added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 24, 2017
@nikomatsakis
Copy link
Contributor

@rfcbot fcp merge

This warning has been out for a while. I propose we move it to deny-by-default.

@rfcbot
Copy link

rfcbot commented Jan 24, 2017

Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@petrochenkov
Copy link
Contributor Author

@nikomatsakis

I propose we move it to deny-by-default.

There's a catch.
It's already deny-by-default for almost 4 months.

@nikomatsakis
Copy link
Contributor

@petrochenkov heh =) Um, d'oh! Then I propose we kill it. I'll start again. :)

@nikomatsakis
Copy link
Contributor

@rfcbot fcp cancel

@rfcbot
Copy link

rfcbot commented Jan 25, 2017

@nikomatsakis proposal cancelled.

@nikomatsakis
Copy link
Contributor

@rfcbot fcp merge

This warning has been deny-by-default for a while. I propose we move it to a hard error.

@rfcbot
Copy link

rfcbot commented Jan 25, 2017

Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot
Copy link

rfcbot commented Jan 30, 2017

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Jan 30, 2017
@rfcbot
Copy link

rfcbot commented Feb 9, 2017

The final comment period is now complete.

@brson brson added the B-unstable Blocker: Implemented in the nightly compiler and unstable. label Mar 1, 2017
@aturon
Copy link
Member

aturon commented Mar 15, 2017

cc @petrochenkov @rust-lang/compiler -- anyone want to make a quick stabilization PR that we can backport to 1.17 beta?

@nikomatsakis
Copy link
Contributor

This seems like a good first bug. I wrote up some directions and posted them to forge for converting compatibility lints into hard errors. The descriptions probably haven't landed yet, but here is the PR:

rust-lang/rust-forge#48

Marking a E-easy and E-mentor, the directions are in that PR. =)

@nikomatsakis nikomatsakis added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Mar 16, 2017
@topecongiro
Copy link
Contributor

Hello, I would like to work on this if no one is interested.

@nikomatsakis
Copy link
Contributor

@topecongiro go for it:)

@nikomatsakis
Copy link
Contributor

@topecongiro please feel free to ping me on irc (nmatsakis) if you encounter any difficulty...

@topecongiro
Copy link
Contributor

@nikomatsakis Thank you!

frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 31, 2017
Make overlapping_inherent_impls lint a hard error

Closes rust-lang#36889.
frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 31, 2017
Make overlapping_inherent_impls lint a hard error

Closes rust-lang#36889.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. B-unstable Blocker: Implemented in the nightly compiler and unstable. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

8 participants