-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Negative impls of Auto Traits (OIBIT) don't take into account Trait Bounds #46813
Labels
A-specialization
Area: Trait impl specialization
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
shepmaster
changed the title
Nagitve impl of Auto Traits (OIBIT) don't take into account Trait Bounds
Negative impls of Auto Traits (OIBIT) don't take into account Trait Bounds
Dec 18, 2017
A TODO in #13231 would be related:
|
pietroalbini
added
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
A-specialization
Area: Trait impl specialization
labels
Jan 30, 2018
would be "fixed" by #79098, which would forbid such an impl |
Current error:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-specialization
Area: Trait impl specialization
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
The following code fails to compile:
It produces the following error.
(Playpen)
Even though I restrict the
!FooAuto
implementation to types implementingFoo
(which there is none of), the rust compiler does not seem to take that restriction into account. Instead, it removes theFooAuto
auto-implementation from every type.If I remove the
!FooAuto
line, the code compiles just fine.The same problems happens when I use
impl<T: Foo>
instead ofwhere T: Foo
(Playpen).Also using
impl FooAuto for .. {}
instead ofauto trait FooAuto
results in the same problem (Playpen).The text was updated successfully, but these errors were encountered: