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

Incorrect trait bounds check #88287

Closed
ivan770 opened this issue Aug 24, 2021 · 1 comment · Fixed by #89918
Closed

Incorrect trait bounds check #88287

ivan770 opened this issue Aug 24, 2021 · 1 comment · Fixed by #89918
Labels
A-GATs Area: Generic associated types (GATs) A-trait-system Area: Trait system C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ivan770
Copy link

ivan770 commented Aug 24, 2021

I tried this code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d372b241527aa63df526377bfc532b31

I expected to see this happen: It compiles or gives me a detailed error.

Instead, this happened: Compiler suggests to add an already existing trait bound. Adding it one more time leads to compiler suggesting adding it once more and so on.

While the code example uses GAT and TAIT, I'm not entirely sure both of those features are required to reproduce the issue.

@rustbot label +T-compiler +F-type_alias_impl_trait +F-generic_associated_types +A-traits +requires-nightly

@ivan770 ivan770 added the C-bug Category: This is a bug. label Aug 24, 2021
@rustbot rustbot added A-trait-system Area: Trait system F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 24, 2021
@JohnTitor
Copy link
Member

This compiles fine on the latest nightly, perhaps related to #88405.

@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 15, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 15, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 15, 2021
jackh726 added a commit to jackh726/rust that referenced this issue Oct 16, 2021
@bors bors closed this as completed in 4fa5d6e Oct 16, 2021
@oli-obk oli-obk moved this from Todo to Done in type alias impl trait stabilization Sep 9, 2022
@fmease fmease added the A-GATs Area: Generic associated types (GATs) label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-GATs Area: Generic associated types (GATs) A-trait-system Area: Trait system C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. F-generic_associated_types `#![feature(generic_associated_types)]` a.k.a. GATs F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Development

Successfully merging a pull request may close this issue.

4 participants