-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
871ee6c
commit f2cebdc
Showing
2 changed files
with
29 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Check that nested impl Trait items work in functions with generic parameters. | ||
// check-pass | ||
|
||
trait Captures<'a> {} | ||
|
||
impl<T> Captures<'_> for T {} | ||
|
||
fn nested_assoc_type<'a: 'a, T>() -> impl Iterator<Item = impl Sized> { | ||
[1].iter() | ||
} | ||
|
||
fn nested_assoc_lifetime<'a: 'a, T>() -> impl Iterator<Item = impl Captures<'a>> { | ||
[1].iter() | ||
} | ||
|
||
fn main() {} |