-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider associated types of type parameters for implied bounds (#399)
Related to #387 ## Synopsis After #387, the following snippet fails to compile: ```rust #[derive(Debug)] struct AssocType<I: Iterator> { iter: I, elem: Option<I::Item>, } ``` This happens, because the implied bound `Option<I::Item>: Debug` is not generated. ## Solution Correct the `ContainsGenericsExt::contains_generics()` implementations to consider associated types of the type parameter.
- Loading branch information
Showing
4 changed files
with
103 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters