Compiler forgets about function-level where clause when a clause for an associated type is present #123173
Labels
A-associated-items
Area: Associated items such as associated types and consts.
A-traits
Area: Trait system
C-bug
Category: This is a bug.
fixed-by-next-solver
Fixed by the next-generation trait solver, `-Znext-solver`.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen: It should compile.
Instead, this happened:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6c4ab41d94cd20eb5102402919325773
Removing the
T::Output: Send
clauses allows it to compile, as does switchingTask
's type parameter fromSelf::Input
to a fixed type like()
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: