about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-12 16:44:37 +0000
committerJosh Stone <jistone@redhat.com>2023-10-20 17:45:16 -0700
commitbeb80d4e077f27e71a328c7525c7df51a9483082 (patch)
tree51e8da5d9c6bff810ea9f6c037910e67a905f650
parent059621db9051ddcd0a4ffaec00b3a59af6322cfb (diff)
Test cross crate
(cherry picked from commit 8f2af7e010945e6d57e839db2673e276e8bf6532)
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/const-fn.rs5
-rw-r--r--tests/rustdoc/inline_cross/const-fn.rs10
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/rustdoc/inline_cross/auxiliary/const-fn.rs b/tests/rustdoc/inline_cross/auxiliary/const-fn.rs
new file mode 100644
index 00000000000..26332b419b6
--- /dev/null
+++ b/tests/rustdoc/inline_cross/auxiliary/const-fn.rs
@@ -0,0 +1,5 @@
+#![feature(effects)]
+
+pub const fn load() -> i32 {
+    0
+}
diff --git a/tests/rustdoc/inline_cross/const-fn.rs b/tests/rustdoc/inline_cross/const-fn.rs
new file mode 100644
index 00000000000..24934b873c2
--- /dev/null
+++ b/tests/rustdoc/inline_cross/const-fn.rs
@@ -0,0 +1,10 @@
+// Regression test for issue #116629.
+// Check that we render the correct generic params of const fn
+
+// aux-crate:const_fn=const-fn.rs
+// edition: 2021
+#![crate_name = "user"]
+
+// @has user/fn.load.html
+// @has - '//pre[@class="rust item-decl"]' "pub const fn load() -> i32"
+pub use const_fn::load;