about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/rustdoc/impl-trait-precise-capturing.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc/impl-trait-precise-capturing.rs b/tests/rustdoc/impl-trait-precise-capturing.rs
new file mode 100644
index 00000000000..d1987a555c1
--- /dev/null
+++ b/tests/rustdoc/impl-trait-precise-capturing.rs
@@ -0,0 +1,14 @@
+#![crate_name = "foo"]
+#![feature(precise_capturing)]
+
+//@ has foo/fn.two.html '//section[@id="main-content"]//pre' "-> impl Sized + use<'b, 'a>"
+pub fn two<'a, 'b, 'c>() -> impl Sized + use<'b, 'a /* no 'c */> {}
+
+//@ has foo/fn.params.html '//section[@id="main-content"]//pre' "-> impl Sized + use<'a, T, N>"
+pub fn params<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
+
+//@ has foo/fn.none.html '//section[@id="main-content"]//pre' "-> impl Sized + use<>"
+pub fn none() -> impl Sized + use<> {}
+
+//@ has foo/fn.first.html '//section[@id="main-content"]//pre' "-> impl use<> + Sized"
+pub fn first() -> impl use<> + Sized {}