From 8f2af7e010945e6d57e839db2673e276e8bf6532 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 12 Oct 2023 16:44:37 +0000 Subject: [PATCH] Test cross crate --- tests/rustdoc/inline_cross/auxiliary/const-fn.rs | 5 +++++ tests/rustdoc/inline_cross/const-fn.rs | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/rustdoc/inline_cross/auxiliary/const-fn.rs create mode 100644 tests/rustdoc/inline_cross/const-fn.rs 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;