diff options
| author | bors <bors@rust-lang.org> | 2022-08-09 05:05:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-09 05:05:46 +0000 |
| commit | 8d1fa7105b2ad3154f63d8f0641fd7da87e20e8f (patch) | |
| tree | 0706d50c40f34d245bfa077567f75f6f318c8872 /src/test | |
| parent | f03ce30962cf1b2a5158667eabae8bf6e8d1cb03 (diff) | |
| parent | 28e4b9e64e436f52b03ba53e0f859a206ef3c93e (diff) | |
Auto merge of #100205 - cjgillot:noice-doc, r=camelid
Avoid ICE in rustdoc when using `Fn` bounds Fixes https://github.com/rust-lang/rust/issues/100143
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc/fn-bound.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/rustdoc/fn-bound.rs b/src/test/rustdoc/fn-bound.rs new file mode 100644 index 00000000000..4c4ffddc8a6 --- /dev/null +++ b/src/test/rustdoc/fn-bound.rs @@ -0,0 +1,21 @@ +// Regression test for #100143 + +use std::iter::Peekable; + +pub struct Span<F: Fn(&i32)> { + inner: Peekable<ConditionalIterator<F>>, +} + +pub struct ConditionalIterator<F> { + f: F, +} + + +// @has 'fn_bound/struct.ConditionalIterator.html' '//h3[@class="code-header in-band"]' 'impl<F: Fn(&i32)> Iterator for ConditionalIterator<F>' +impl<F: Fn(&i32)> Iterator for ConditionalIterator<F> { + type Item = (); + + fn next(&mut self) -> Option<Self::Item> { + todo!() + } +} |
