From cf2dff2b1e3fa55fa5415d524200070d0d7aacfe Mon Sep 17 00:00:00 2001
From: Albert Larsan <74931857+albertlarsan68@users.noreply.github.com>
Date: Thu, 5 Jan 2023 09:13:28 +0100
Subject: Move /src/test to /tests
---
tests/rustdoc/universal-impl-trait.rs | 55 +++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
create mode 100644 tests/rustdoc/universal-impl-trait.rs
(limited to 'tests/rustdoc/universal-impl-trait.rs')
diff --git a/tests/rustdoc/universal-impl-trait.rs b/tests/rustdoc/universal-impl-trait.rs
new file mode 100644
index 00000000000..f5eabda59b7
--- /dev/null
+++ b/tests/rustdoc/universal-impl-trait.rs
@@ -0,0 +1,55 @@
+#![crate_name = "foo"]
+
+use std::io::Read;
+use std::borrow::Borrow;
+
+// @has foo/fn.foo.html
+// @has - //pre 'foo('
+// @matchesraw - '_x: impl ('
+ // @matchesraw - '_x: impl (T);
+
+impl S {
+ // @has foo/struct.S.html
+ // @hasraw - 'bar('
+ // @matchesraw - '_bar: impl ('
+ // @matchesraw - '_baz:.+struct\.S\.html.+impl .+trait\.Clone\.html'
+ pub fn baz(_baz: S) {
+ }
+
+ // @hasraw - 'qux('
+ // @matchesraw - 'trait\.Read\.html'
+ pub fn qux(_qux: impl IntoIterator- >) {
+ }
+}
+
+// @hasraw - 'method('
+// @matchesraw - '_x: impl Trait for S {}
+
+// @has foo/fn.much_universe.html
+// @matchesraw - 'T:.+Borrow.+impl .+trait\.Trait\.html'
+// @matchesraw - 'U:.+IntoIterator.+= impl.+Iterator\.html.+= impl.+Clone\.html'
+// @matchesraw - '_: impl .+trait\.Read\.html.+ \+ .+trait\.Clone\.html'
+pub fn much_universe<
+ T: Borrow,
+ U: IntoIterator
- >,
+>(
+ _: impl Read + Clone,
+) {
+}
--
cgit 1.4.1-3-g733a5