Closed
Description
We can now write bounds of form:
T: MyTrait<AssociatedType: OtherTrait>,
When you find bounds of form:
T: MyTrait,
T::AssociatedType: OtherTrait,
// or, but less commonly:
<T as MyTrait>::AssociatedType: OtherTrait,
You can rewrite them to the first form (but you'll need to add the feature gate...).
One regex you can try is: ::\w+: \w+
(doesn't cover lifetimes).
This is relevant both for the standard library and throughout the compiler.
Clippy may also want to do this and possibly also add an experimental lint? cc @oli-obk
cc #52662
This issue has been assigned to @iluuu1994 via this comment.
Metadata
Metadata
Assignees
Labels
Category: PRs that clean code up or issues documenting cleanup.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Help is requested to fix this issue.`#![feature(associated_type_bounds)]`Relevant to the compiler team, which will review and decide on the PR/issue.