summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs')
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs b/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs
new file mode 100644
index 000000000..19433c968
--- /dev/null
+++ b/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs
@@ -0,0 +1,41 @@
+// edition:2018
+
+use std::ops::Deref;
+
+pub fn func<'a>(_x: impl Clone + Into<Vec<u8>> + 'a) {}
+
+pub fn func2<T>(
+ _x: impl Deref<Target = Option<T>> + Iterator<Item = T>,
+ _y: impl Iterator<Item = u8>,
+) {}
+
+pub fn func3(_x: impl Iterator<Item = impl Iterator<Item = u8>> + Clone) {}
+
+pub fn func4<T: Iterator<Item = impl Clone>>(_x: T) {}
+
+pub fn func5(
+ _f: impl for<'any> Fn(&'any str, &'any str) -> bool + for<'r> Other<T<'r> = ()>,
+ _a: impl for<'alpha, 'beta> Auxiliary<'alpha, Item<'beta> = fn(&'beta ())>,
+) {}
+
+pub trait Other {
+ type T<'dependency>;
+}
+
+pub trait Auxiliary<'arena> {
+ type Item<'input>;
+}
+
+pub async fn async_fn() {}
+
+pub struct Foo;
+
+impl Foo {
+ pub fn method<'a>(_x: impl Clone + Into<Vec<u8>> + 'a) {}
+}
+
+pub struct Bar;
+
+impl Bar {
+ pub async fn async_foo(&self) {}
+}