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
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-12 16:44:37 +0000
commit8f2af7e010945e6d57e839db2673e276e8bf6532 (patch)
tree29ac2279eea54b555cf4d299bd05c94e36e8ee39
parentc4e61faf2e078dc30b62488326404137600e5e11 (diff)
downloadrust-8f2af7e010945e6d57e839db2673e276e8bf6532.tar.gz
rust-8f2af7e010945e6d57e839db2673e276e8bf6532.zip
Test cross crate
-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;