diff options
Diffstat (limited to 'src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs')
-rw-r--r-- | src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs b/src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs new file mode 100644 index 000000000..6f66b8e55 --- /dev/null +++ b/src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs @@ -0,0 +1,25 @@ +// Regression test for issue #72213 +// Tests that we don't ICE when we have projection predicates +// in our initial ParamEnv + +pub struct Lines<'a, L> +where + L: Iterator<Item = &'a ()>, +{ + words: std::iter::Peekable<Words<'a, L>>, +} + +pub struct Words<'a, L> { + _m: std::marker::PhantomData<&'a L>, +} + +impl<'a, L> Iterator for Words<'a, L> +where + L: Iterator<Item = &'a ()>, +{ + type Item = (); + + fn next(&mut self) -> Option<Self::Item> { + unimplemented!() + } +} |