Skip to content

Incorrect trait bounds check #88287

Closed
@ivan770

Description

@ivan770

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-GATsArea: Generic associated types (GATs)A-trait-systemArea: Trait systemC-bugCategory: This is a bug.E-needs-testCall 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. GATsF-type_alias_impl_trait`#[feature(type_alias_impl_trait)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions