-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Constraining one associated type doesn't normalize the bounds on others #37808
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
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.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Note that this version works: https://is.gd/MIFVFg (Removing the |
jonas-schievink
added
A-associated-items
Area: Associated items (types, constants & functions)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Oct 10, 2019
Centril
added a commit
to Centril/rust
that referenced
this issue
Oct 19, 2019
…asper Use structured suggestion for restricting bounds When a trait bound is not met and restricting a type parameter would make the restriction hold, use a structured suggestion pointing at an appropriate place (type param in param list or `where` clause). Account for opaque parameters where instead of suggesting extending the `where` clause, we suggest appending the new restriction: `fn foo(impl Trait + UnmetTrait)`. Fix rust-lang#64565, fix rust-lang#41817, fix rust-lang#24354, cc rust-lang#26026, cc rust-lang#37808, cc rust-lang#24159, fix rust-lang#37138, fix rust-lang#24354, cc rust-lang#20671.
Centril
added a commit
to Centril/rust
that referenced
this issue
Oct 19, 2019
…asper Use structured suggestion for restricting bounds When a trait bound is not met and restricting a type parameter would make the restriction hold, use a structured suggestion pointing at an appropriate place (type param in param list or `where` clause). Account for opaque parameters where instead of suggesting extending the `where` clause, we suggest appending the new restriction: `fn foo(impl Trait + UnmetTrait)`. Fix rust-lang#64565, fix rust-lang#41817, fix rust-lang#24354, cc rust-lang#26026, cc rust-lang#37808, cc rust-lang#24159, fix rust-lang#37138, fix rust-lang#24354, cc rust-lang#20671.
matthewjasper
added
the
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
label
Jul 11, 2020
This now compiles. |
estebank
added
the
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
label
Feb 2, 2021
jackh726
removed
the
F-associated_type_bounds
`#![feature(associated_type_bounds)]`
label
Feb 2, 2021
jackh726
added a commit
to jackh726/rust
that referenced
this issue
Feb 2, 2021
Add more associated type tests Closes rust-lang#24159 Closes rust-lang#37808 Closes rust-lang#39532 Closes rust-lang#37883 r? `@estebank`
fmease
added
A-trait-system
Area: Trait system
and removed
A-trait-system
Area: Trait system
labels
Dec 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-lazy-normalization
Area: Lazy normalization (tracking issue: #60471)
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.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The trait system seems to be missing a normalization in bounds for associated items:
produces the error:
The text was updated successfully, but these errors were encountered: