Skip to content

Commit

Permalink
Use #[doc(hidden)] instead of #[allow(missing_docs)] on the const…
Browse files Browse the repository at this point in the history
… generated for `#[test]`
  • Loading branch information
ogoffart committed Sep 11, 2024
1 parent 6eddbb7 commit 5d456df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_builtin_macros/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ pub(crate) fn expand_test_or_bench(
cx.attr_nested_word(sym::cfg, sym::test, attr_sp),
// #[rustc_test_marker = "test_case_sort_key"]
cx.attr_name_value_str(sym::rustc_test_marker, test_path_symbol, attr_sp),
// #[allow(missing_docs)]
cx.attr_nested_word(sym::allow, sym::missing_docs, attr_sp),
// #[doc(hidden)]
cx.attr_nested_word(sym::doc, sym::hidden, attr_sp),
],
// const $ident: test::TestDescAndFn =
ast::ItemKind::Const(
Expand Down
6 changes: 3 additions & 3 deletions tests/pretty/tests-are-sorted.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "m_test"]
#[allow(missing_docs)]
#[doc(hidden)]
pub const m_test: test::TestDescAndFn =
test::TestDescAndFn {
desc: test::TestDesc {
Expand All @@ -37,7 +37,7 @@
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "z_test"]
#[allow(missing_docs)]
#[doc(hidden)]
pub const z_test: test::TestDescAndFn =
test::TestDescAndFn {
desc: test::TestDesc {
Expand All @@ -63,7 +63,7 @@
extern crate test;
#[cfg(test)]
#[rustc_test_marker = "a_test"]
#[allow(missing_docs)]
#[doc(hidden)]
pub const a_test: test::TestDescAndFn =
test::TestDescAndFn {
desc: test::TestDesc {
Expand Down

0 comments on commit 5d456df

Please sign in to comment.