We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79b6bad commit e846c52Copy full SHA for e846c52
src/test/rustdoc/anonymous-lifetime.rs
@@ -0,0 +1,28 @@
1
+// Regression test for https://github.com/rust-lang/rust/issues/84634
2
+#![crate_name = "foo"]
3
+
4
+use std::pin::Pin;
5
+use std::task::Poll;
6
7
+pub trait Stream {
8
+ type Item;
9
10
+ fn poll_next(mut self: Pin<&mut Self>) -> Poll<Option<Self::Item>>;
11
+ fn size_hint(&self) -> (usize, Option<usize>);
12
+}
13
14
+// @has 'foo/trait.Stream.html'
15
+// @has - '//*[@class="code-header in-band"]' 'impl<S: ?Sized + Stream + Unpin> Stream for &mut S'
16
+impl<S: ?Sized + Stream + Unpin> Stream for &mut S {
17
+ type Item = S::Item;
18
19
+ fn poll_next(
20
+ mut self: Pin<&mut Self>,
21
+ ) -> Poll<Option<Self::Item>> {
22
+ S::poll_next(Pin::new(&mut **self), cx)
23
+ }
24
25
+ fn size_hint(&self) -> (usize, Option<usize>) {
26
+ (**self).size_hint()
27
28
0 commit comments